Pure CSS – Animation Effect – Flash

CSS Source Code:

@-webkit-keyframes flash {
	0%, 50%, 100% {opacity: 1;}	
	25%, 75% {opacity: 0;}
}

@-moz-keyframes flash {
	0%, 50%, 100% {opacity: 1;}	
	25%, 75% {opacity: 0;}
}

@-o-keyframes flash {
	0%, 50%, 100% {opacity: 1;}	
	25%, 75% {opacity: 0;}
}

@keyframes flash {
	0%, 50%, 100% {opacity: 1;}	
	25%, 75% {opacity: 0;}
}

HTML Source Code:

<!DOCTYPE html>
<html>
<head>
<title>Animation Effects</title>
<style type="text/css">@import url(flash.css);</style> 
<style type="text/css"> 
#animated { 
    width: 90%;
}
#animated:hover { 
    -webkit-animation: flash 1300ms; /* Chrome, Safari 5+ */
    -moz-animation: flash 1300ms; /* Firefox 5-15 */
    -o-animation: flash 1300ms; /* Opera 12.00 */
    animation: flash 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 >