+ 8
How to set an image inside text?
How can I put an image inside text, so the text has as color the image?
10 Respostas
+ 9
background:url(img);
background-clip:text;
(might have to add vendor prefixes on clip...)
+ 12
prefixes:
-moz- (mozilla)
-o- (opera)
-ms- (internet explorer)
-webkit- (mobile)
(use appropriate)
+ 10
try vendor prefixes :
-webkit-background-clip:text;
+ 9
Nothing… (is the url accurate?)
+ 8
Here's my code :
<span id="span1">
<h1 style="background:url('image.jpg');-webkit-background-clip:text;text-decoration:underline">MyHomePage</h1>
</span>
What I did wrong?
+ 8
Yeah, sure. The file is image.jpg and it's in the same folder. Also, if I don't write background-clip:text, it sets the image as background; if I write it as shown above, nothing happens. However Thank You @ValentinHacker.
+ 7
I read that it can be done with background-clip, but I didn't understand the entire code.
+ 6
I just tried it but it sets the image as background and not inside the text.
+ 6
Tried with Chrome Mobile with -webkit-, there's no difference.
+ 5
Thank You, but It's the same.