I have a weird problem and honestly I have no idea how to do that.
I have a box with background image. Over the background image I have a lot of boxes with a background color and text. I would like the color of the text in every box to be transparent, so the color will be the part of the background image that text is above.
Here is an example: http://jsfiddle.net/wjdwohdd/5/
Instead of the green background, it should be an image.
<div class="box">
<div class="background">
Example text
</div>
</div>
.box {
width:200px;
height:20px;
background-color: green;
padding: 10px;
}
.background {
color: transparent;
height: 100%;
width: auto;
background-color: red;
text-align: center;
}
If I set color: transparent, the text's color becomes red and I am not sure even if it is possible to be the background image.
EDIT: I updated my jsfiddle. I would like the color of the text to be the part of the image that is behind the text.