Pure CSS – Animation Effect – Bounce

CSS Source Code:

@-webkit-keyframes bounce {
	0%, 20%, 50%, 80%, 100% {-webkit-transform: translateY(0);}
	40% {-webkit-transform: translateY(-30px);}
	60% {-webkit-transform: translateY(-15px);}
}

@-moz-keyframes bounce {
	0%, 20%, 50%, 80%, 100% {-moz-transform: translateY(0);}
	40% {-moz-transform: translateY(-30px);}
	60% {-moz-transform: translateY(-15px);}
}

@-o-keyframes bounce {
	0%, 20%, 50%, 80%, 100% {-o-transform: translateY(0);}
	40% {-o-transform: translateY(-30px);}
	60% {-o-transform: translateY(-15px);}
}
@keyframes bounce {
	0%, 20%, 50%, 80%, 100% {transform: translateY(0);}
	40% {transform: translateY(-30px);}
	60% {transform: translateY(-15px);}
}

HTML Source Code:

<!DOCTYPE html>
<html>
<head>
<title>Animation Effects</title>
<style type="text/css">@import url(bounce.css);</style> 
<style type="text/css"> 
#animated { 
    width: 90%;
}
#animated:hover { 
    -webkit-animation: bounce 1300ms; /* Chrome, Safari 5+ */
    -moz-animation: bounce 1300ms; /* Firefox 5-15 */
    -o-animation: bounce 1300ms; /* Opera 12.00 */
    animation: bounce 1300ms; /* Chrome, Firefox 16+, IE 10+, Opera 12.10+ */
} 
</style>
</head>
 
<body>
Mouseover thumbnail to see the effect
<table style="width:100%;margin-top:30px;">
<tr>
    <td><img id="animated" src="images/thumb1.jpg" > </td>
    <td><img id="animated" src="images/thumb2.jpg" > </td>
    <td><img id="animated" src="images/thumb3.jpg" > </td>
    <td><img id="animated" src="images/thumb4.jpg" > </td>
  </tr>
</table>
</body>
 
</html>
DEMO

 

My official WebSite >