+ 2

Is there a way to change the opacity of a background image without affecting other elements using CSS

Background opacity

5th Jan 2019, 8:03 PM
Mario
Mario - avatar
6 Answers
5th Jan 2019, 8:32 PM
Regina Regenbogen
Regina Regenbogen - avatar
+ 1
Thanks Regina Regenbogen that was exatly what i was looking for
5th Jan 2019, 8:37 PM
Mario
Mario - avatar
+ 1
You are welcome Mario Glad I could help :)
5th Jan 2019, 8:46 PM
Regina Regenbogen
Regina Regenbogen - avatar
0
You can use linear gradient linear-gradient(rgba(0,0,0,0.7),rgba(0,0,0,0.7)),url('your image url hear');
5th Jan 2019, 8:08 PM
Rishi Anand
Rishi Anand - avatar
0
No I mean making the background half transparent while the text is fully visible here for example the background is transparent but everything else in body too body { background:url(" "); Opacity:0.5; }
5th Jan 2019, 8:25 PM
Mario
Mario - avatar
5th Jan 2019, 8:54 PM
Mario
Mario - avatar