hi
I used below code to set opacity for image
opacity: 0.4; filter: alpha(opacity=40);
but color of opacity is white I want it has black color how I can do it?
Best regards
Neda
Please set the div width and hieght same as Image hieght same .
HTML
<html xmlns="http://www.w3.org/1999/xhtml"> <head runat="server"> <title></title> <style type="text/css"> .images { opacity: 0.4; filter: alpha(opacity=40); } .ImageBackground { background-color: #000; width: 410px; height: 310px; } </style> </head> <body> <form id="form1" runat="server"> <div> <div class="ImageBackground"> <img src="http://www.aspsnippets.com/Demos/SampleImages/JellyFish.jpg" alt="JellyFish" class="images" /> </div> </div> </form> </body> </html>
Demo
© COPYRIGHT 2025 ASPSnippets.com ALL RIGHTS RESERVED.