You can add a mask over the image like the one below:
html:
<div>
<img scr="yourImage.jpg" alt="" />
<div class="mask"></div>
</div>
css:
.mask{
position:absolute;
width:100%;
height:100%;
background:rgba(0,0,0,0.3);
}
I think what you need is a css filter.
For the very latest browsers check out these examples which use:
img {
-webkit-filter: brightness(20%);
filter:brightness(20%);
}
For older browsers check out these examples which use:
img {
opacity: 0.3;
filter: alpha(opacity=50); /* For IE8 and earlier */
}
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.