05-08-2009, 07:33 AM
Codice che permette il cambio dell'immagine al passaggio del mouse in CSS.
Height: altezza
Width: larghezza
http://example.com/image1.png è la prima immagine
http://example.com/image2.png è la seconda
Codice:
<div class="fregio"><p></p></div>
<style type="text/css">
.fregio p{background-image: url(http://example.com/image1.png); height: XXpx; width: YYpx;}
.fregio p:hover {background-image:url(http://example.com/image2.png); width:XXpx; height:XXpx;}
</style>Width: larghezza
http://example.com/image1.png è la prima immagine
http://example.com/image2.png è la seconda

