Pure CSS – Animation Effect – Flash

CSS Source Code:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
@-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:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
<!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 >