|
Rollover Images Does anyone know the code for rollover hovers that change the image?
like you see a picture, you hover on it and it changes picture, thankssss
[ ] Want to answer more questions in the Technology category? Maybe give some free advice about: Internet & Web Design?
Typically it's done like this:
<img src="original image" onmouseover="this.src='hover image url'" onmouseout="this.src='original image again'">
For example, this will start with the Advicenators logo and switch to the Google logo when hovered over:
<img src="http: //www.advicenators.com/img/hsingle.gif" onmouseover="this.src='http: //img0.gmodules.com/ig/images/logos/approved/white.png'" onmouseout="this.src='http: //www.advicenators.com/img/hsingle.gif'">
If you want to test that example, make sure you remove the spaces in the URLs. I put them there to prevent them from turning into links.
It's also possible to do this using CSS, but it's longer and there are a lot of workarounds. Search to get instructions:
]
More Questions: |