I saw some similar questions regarding this. But my approach is different and none of those works for me. That's why I'm posting this. I want to change the opacity of the background image without changing the opacity of child elements, where the background image is loaded inside the body tag.
HTML:
<body> <div id = "background-div"> <div class = "header"> <div class = "ham-icon"> <img src = "images/ham-icon.png"> </div> <div class = "logo"> <span class = "google-logo">Google</span><span class = "hangouts-logo"> Hangouts</span> </div> <div class = "profile-data"> </div> </div> <div class = "body"> </div> </div> </body> CSS:
body { position: relative; background: url(../images/back1.jpg) no-repeat center center fixed; -webkit-background-size: cover; -moz-background-size: cover; -o-background-size: cover; background-size: cover; }