Imagen con "tembleque"

Un curioso efecto para imagenes, al pasar el puntero sobre ellas se ponen a temblar.
Hay que pegar este código entre <head> y </head> yo lo he puesto justo antes de ]]></b:skin>
Código:
<style><br />.shakeimage{<br />position:relative<br />}<br /></style><br /><script language="JavaScript1.2"><br /><br /><br />//configura aquí la intensidad del movimiento aumentando o disminuyendo el número<br />var rector=5<br /><br />///////No escribas a partir de aquí///////////<br />var stopit=0 <br />var a=1<br /><br />function init(which){<br />stopit=0<br />shake=which<br />shake.style.left=0<br />shake.style.top=0<br />}<br /><br />function rattleimage(){<br />if ((!document.all&&!document.getElementById)||stopit==1)<br />return<br />if (a==1){<br />shake.style.top=parseInt(shake.style.top)+rector<br />}<br />else if (a==2){<br />shake.style.left=parseInt(shake.style.left)+rector<br />}<br />else if (a==3){<br />shake.style.top=parseInt(shake.style.top)-rector<br />}<br />else{<br />shake.style.left=parseInt(shake.style.left)-rector<br />}<br />if (a<4)<br />a++<br />else<br />a=1<br />setTimeout("rattleimage()",50)<br />}<br /><br />function stoprattle(which){<br />stopit=1<br />which.style.left=0<br />which.style.top=0<br />}<br /><br /></script>

Y esto se lo añades a tu imagen:
<img src="URL DE TU IMAGEN" class="shakeimage" onMouseOver="init(this);rattleimage()" onMouseOut="stoprattle(this)">

Prueba el efecto "tembleque" (IE).

Rosa in memoriam

0 comentarios:

Publicar un comentario

Si llegaste hasta acá y no lo encontraste lo que necesitás intentá buscarlo: