Created
May 27, 2015 15:01
-
-
Save porfidev/86b2b0fcdf2a428d91c6 to your computer and use it in GitHub Desktop.
JS para animacion rapida con estilos CSS
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head lang="en"> | |
<meta charset="UTF-8"> | |
<title></title> | |
<style> | |
.imagenloca{ | |
width: 100px; | |
height: 100px; | |
background-color: #FCA; | |
margin: 10px; | |
float: left; | |
} | |
</style> | |
</head> | |
<body> | |
<div id="producto-1" class="imagenloca" onmouseover="easiarIn(this);" onmouseout="easiarOut(this);"></div> | |
<div id="producto-2" class="imagenloca" onmouseover="easiarIn(this);" onmouseout="easiarOut(this);"></div> | |
<div id="producto-3" class="imagenloca" onmouseover="easiarIn(this);" onmouseout="easiarOut(this);"></div> | |
<script> | |
function easiarIn(element){ | |
element.style.transform = 'scale(1.5)'; | |
element.style.transition = '0.2s ease-in'; | |
} | |
function easiarOut(element){ | |
element.style.transform = 'scale(1)'; | |
element.style.transition = '0.2s ease-out'; | |
} | |
</script> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment