I want to use css, to fill a certain color on my image, it will have a blur reduction.
I tried many ways but colors can not be inserted on the image. Please tell me the parameters so that I can adjust the width or height, or the opacity, change the color.
You can use pseudoelement after
to position the color above the image as this:
div, img {width:100%;}
div {position:relative;}
div:after {
width:100%;
content:'';
display:block;
position:absolute;
top:0;
left:0;
background: linear-gradient(to right, rgba(247,247,49,1) 0%,rgba(255,255,255,0) 69%);
height:100%;
}
<div>
<img src="http://img.andrewprokos.com/TORONTO-PANORAMIC-SKYLINE-DUSK-1200PX.jpg" alt="">
</div>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With