0

Hello i want to add some CSS3 filters on a background image but the effects take place on the text too not just the background image.

Here is the css code

  <div style="color:whitesmoke;
                background-image:url(wall_icons/uploadMedia.png); 
  background-size:contain;-webkit-filter:grayscale(1.7);
  filter: brightness(0.2);
-webkit-filter: brightness(0.2);
-moz-filter: brightness(0.2);
-o-filter: brightness(0.2);
-ms-filter: brightness(0.2);
   background-repeat:no-repeat"> <small style="font-size: 3vmin;">Text.Text.Text.Text.Text.Text.</small> </b> </div> 
2
Contributors
1
Reply
15
Views
7 Months
Discussion Span
Last Post by diafol
0

Not sure if you realise this simon, but you are setting the css on the DIV which contains the text, so of course it will be affected. What were you expecting?

http://stackoverflow.com/a/20039965

Look at the content:before method and see the codepen example.

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.