+ 1
Change Pic Opacity in CSS?
How can I change a picture's opacity/brightness w/o JS?
4 Antworten
+ 2
@ css tab write:
img{ opacity: value;}
(value range: 0<=value<=1)
Example:
img{ opacity: 0.5;}
result: your image will be 50% opaque
+ 1
@Haris when doing like so, the text itself gets a lower opacity:
div.background1{
background-image:url("https://upload.wikimedia.org/wikipedia/commons/9/9e/Cuban_crisis_map_missile_range.jpg");
background-repeat:no-repeat;
background-position:center;
opacity:0.5;
}
I will try it with img now, but I think it's strange that text belongs to background... thx! couldn't find this that easily in the web!
+ 1
No problem :)
Css course here has an opacity lesson though I don't remember where exactly.
Try it if you haven't, it's great.
0
your text effect by opacity, because your other elements wrap by your background tag