I'm trying to give my full page background-image an opacity but when I add the opacity code, my whole html get's an opacity of 0.4 exept the image.
html {
background: url(../img/bg2.jpg) no-repeat center center fixed;
-webkit-background-size: cover;
-moz-background-size: cover;
-o-background-size: cover;
background-size: cover;
}
I tried to add opacity like this:
html {
background: url(../img/bg2.jpg) no-repeat center center fixed;
-webkit-background-size: cover;
-moz-background-size: cover;
-o-background-size: cover;
background-size: cover;
opacity: 0.4;
}
But as I said, my whole html turns 0.4
And I tried to add 0.4 after background: url(../img/bg2.jpg) no-repeat center center fixed 0.4;
but my image just goes blank then.
How can I add 0.4 only to my background-image?