Say I have the following code:
<span>Hello world!</span>
And the following CSS:
span{
color:red;
}
Is there any way I can change the red to an image? Like url(images/text-bg.png);? I want to put a texture on my text and decided that I would just make the text “color” an image, but I’m not sure if this can be done with CSS.
Yes it’s possible using svg , you can embed
<svg>over one<div>and background image over another<div>, later apply z-index to<div>. You can use Vector applications like illustrator to create the svg the way you want.