PDA

View Full Version : background-image transparency



karthik
04-23-2010, 02:15 AM
Hey
Im having some trouble with some background-images backgrounds not being transparent when used as background-image in css! The images have been formatted okay and theyre backgrounds are transparent when the images aren't used as background-images. Is there a work around to get the images to display as intended as background-images?

Thanks in advance

AjayGohil
03-27-2019, 12:57 AM
for the background-image transparency
<!DOCTYPE html>
<html>
<style>
img {
opacity: 0.5;
filter: alpha(opacity=50);
}

</style>
</head>
<body>
<h1>Image Transparency</h1>
<img src="your path" width="170" height="100">
<img src="your path" width="170" height="100">
<img src="your path" width="170" height="100">
</body>
</html>
http://www.ifourtechnolab.com

tonikalra
04-26-2019, 05:38 AM
In this case we want the image to NOT be transparent when the user hovers over it. ... When using the opacity property to add transparency to the background.