Change background image opacity
You can't use transparency on background-images directly, but you can achieve this effect with something like this:
http://jsfiddle.net/m4TgL/
HTML:
<div class="container">
<div class="content">//my blog post</div>
</div>
CSS:
.container { position: relative; }
.container:before {
content: "";
position: absolute;
top: 0;
bottom: 0;
left: 0;
right: 0;
z-index: 1;
background-image: url('image.jpg');
opacity: 0.5;
}
.content {
position: relative;
z-index: 2;
}
Nowadays, it is possible to do it simply with CSS property "background-blend-mode".
<div id="content">Only one div needed</div>
div#content {
background-image: url(my_image.png);
background-color: rgba(255,255,255,0.6);
background-blend-mode: lighten;
/* You may add things like width, height, background-size... */
}
It will blend the background-color (which is white, 0.6 opacity) into the background image. Learn more here (W3S).
Try doing this:
.bg_rgba {
background-image: url(https://picsum.photos/200);
background-color: rgba(255, 255, 255, 0.486);
background-blend-mode: overlay;
width: 200px;
height: 200px;
border: 1px solid black;
}
<div class="bg_rgba"></div>
worked in my case. You can reduce or increase the background-color alpha value according to your needs.