I am trying to make an image looks like it is kind of transparent? I don't really know how to describe it but it is like you can write texts on it and the image is in the back.
is this doable with css or javascript or any other language?
You needed to put the :hover on image, and make the . overlay cover the whole image by adding right:0; and bottom:0 .
In short, CSS overlay effects are achieved by using the following: background-image and background CSS properties to add image and linear-gradient overlay effect. position:absolute , top , bottom , right , left CSS properties to control the position of overlay image or text.
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 */
}
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);
}
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