Hi,
I wondered if it's possible to change an image captured in an Anchor by another image using CSS a:hover ?
for example when I hover this link :
<A href="..."><img scr="image1.gif"></a>
then display image : "image2.gif"
You can do that easily with JavaScript. Change only on MouseOver:
<A href="..."><img scr="image1.gif" onMouseOver="this.src='image2.gif';"></a>
Change onMouseOver and onMouseOut:
<A href="..."><img scr="image1.gif" onMouseOver="this.src='image2.gif';" onMouseOut="this.src='image1.gif';"></a>
I'm not sure if it's possible in CSS. I think it is, but everyone uses JavaScript for this, so I'm giving you this version.
Rick -----------------------------------------------------------
You could use the onmouseover /onmouseoff events to change the CSS class. Each class could specify a background image for a div or span which you should probably specify dimensions for.
Just an idea...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.