Quiero que los expertos resuelvan el problema del código js y html. ¿Por qué el texto se mueve después de agregar texto al frente?
ltdiv id = " divP " estilo = " posición: absoluta; arriba: 0; " gt ltimg src = " 1 . png "/ gt lt/div ltdiv gt = " a " estilo = " posición: absoluta; arriba: 100; "onmouseOver="mouseOver()"
onmouseOut = " mouseOut()" gt; lta gt texto
ltscript type = " texto/JavaScript " gt;
Función mouseOver(){
var a = 0;
Función mover(){
a;
if( a = = 49){ clear intervalo(time);}
divp style . top =(divp . style . top . replace(' px ', '')-0 3); >
}
var tiempo = ventana . setinterval(move, 10);}
Función mouseOut(){
var ab = 0;
Función mov(){
a b;
if(ab == 49){ intervalo claro(tiempo);}
divp . estilo . arriba =(divp . estilo . arriba . reemplazar(' px ', '')-3
}
var tiempo = ventana.setInterval(mov, 10); ); }
lt/script gt;
lt tipo de estilo - "texto/CSS"
# a: hover { color: rojo }
lt/estilo gt;