|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Image Swapping through CSS?
I've seen it done before but im not sure how. Is there a CSS alternative to the javascript mouseover?
|
|
#2
|
|||
|
|||
|
Where have you see it done?
You need the Javascript code to make the mouseover function. You may have seen a page that incorporates CSS into the design. |
|
#3
|
|||
|
|||
|
Yup.
<html> <head> <title>untitled</title> <script type="text/javascript" language="javascript"> //preload - for quick display var x = new Image(); x.src = 'http://thumb-2.image.altavista.com/image/238889524'; </script> <style type="text/css"> .roll { width: 131px; height: 131px; border: 8px salmon ridge; cursor: default; background: url(http://thumb-1.image.altavista.com/image/16411627); } a:hover.roll { background: url(http://thumb-2.image.altavista.com/image/238889524); } </style> </head> <body> <a class="roll" href="#" onmouseover="status=defaultStatus;return true;" onclick="return false;"></a> </body> </html> Last edited by adios : August 30th, 2002 at 06:28 PM. |
![]() |
| Viewing: Dev Shed Forums > Web Design > CSS Help > Image Swapping through CSS? |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|