css - Change alpha for an image hover in CSS2 standard? -
Imageprop = "text">
I am trying to add alpha effect to my image image is in round shape rectangular shape. I know that there are attributes for changing alpha in CSS3, but I'm trying to be in line with the W3C standard, which is still CSS 2.
Sorry, I did not tell my question correctly, I was trying to change the alpha while hovering over the image using CSS 2. I'm thinking of using "background-image" for 100% alpha and using the IMG tag for 50% alpha. Is there a better way of doing this?
If the image is one, then you can include the alpha directly image. Of course this will require a script for IE6.
Otherwise, you can use CSS to set transparency.
EDIT: Updated only to work on the hover, note that it will not work in IE6.
img.transparent {filter: alpha (opacity = 100); / * Internet Explorer * / Opacity: 1; / * Fx, Safari, Opera, Chrome * img.transparent: Hover {Filters: Alpha (Opacity = 50); / * Internet Explorer * / Opacity: 0.5; / * Fx, Safari, Opera, Chrome * /
Comments
Post a Comment