1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
2 <html xmlns="http://www.w3.org/1999/xhtml">
3 <head>
4 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
5 <title>无标题文档</title>
6 <style type="text/css">
7 @-webkit-keyframes twinkling-transform{ /*透明度由0到1*/
8 0%{
9 opacity:1; /*透明度为0*/
10 color:black;
11 }
12 100%{
13 opacity:1; /*透明度为1*/
14 color:red;
15 }
16 }
17
18 .twinkling{
19 -webkit-animation: twinkling-transform 2s infinite ease-in-out;
20 }
21 </style>
22 </head>
23
24 <body>
25 <div class="twinkling">1234567</div>
26 </body>
27 </html>