Buenos dias compañeros del foro.
Tengo una pregunta.
tengo un documento HTML como el siguiente:
Código HTML:
Ver original<!-- escribire unicamente la parte importante->
<div id="cuadroAN">
CONTENDIO
</div>
<input type="button" value="Aplicar Estilo" id="boton">
Le aplico estilos con css:
Código CSS:
Ver original#cuadroAN{
-webkit-animation-name:an;
-webkit-animation-duration:1s;
}
@-keyframes an{
0%{
width:0px;
height:0px;
}100%{
width:300px;
height:300px;
}
}
Y quiero llamar la animacion del documento .CSS desde el documento .JS. Algo asi:
Código Javascript
:
Ver originalfunction inicio(){
var boton=document.getElemenById("boton");
boton.click.funcionAN();//cuando hagamos click en el boton llamar a la funcion funcionAN().
}
function funcionAN(){
//obtener la animacion y hacer que funcione
}
Muchas gracias a aquel que decida ayudarme.
Buen dia.