+ 4

Background of a webpage

I need help with something, I want to put opacity in the background of a webpage (which is an image) without affect the whole body, only the image. How can I do? Thank you !

10th Nov 2019, 4:39 PM
Franlex Eduardo Ramírez Polidor
Franlex Eduardo Ramírez Polidor - avatar
6 Respuestas
10th Nov 2019, 5:24 PM
Franlex Eduardo Ramírez Polidor
Franlex Eduardo Ramírez Polidor - avatar
+ 4
I put that Code, but when I put the opacity It affects the text that I have and i want to affect only the image
10th Nov 2019, 5:26 PM
Franlex Eduardo Ramírez Polidor
Franlex Eduardo Ramírez Polidor - avatar
+ 3
I'm also a beginner in html, but here is how I would do it: HTML code: <div id="background-image"></div> CSS code: html, body { width: 100%; height: 100%; } #background-image { position: fixed; z-index: -1; width: 100%; height: 100%; background-image: (path to image); opacity: (your opacity); }
10th Nov 2019, 6:48 PM
Aymane Boukrouh
Aymane Boukrouh - avatar
+ 2
How did you do it ? Post your code here so we can correct it
10th Nov 2019, 5:01 PM
Aymane Boukrouh
Aymane Boukrouh - avatar
OSZAR »