实现原理,很简单,定义动画,循环执行,透明度0~1,就有效果了。
看看下面的效果吧
C:\wwwroot\home\yefngs>_
实现的代码
<code>
<p>C:\wwwroot\home\yefngs><span class="dos">_</span></p>
<style type="text/css">
.dos{ -moz-animation:dos 1s infinite;
-webkit-animation:dos 1s infinite;
}
@-moz-keyframes dos
{
0% { opacity:1;}
100% {opacity:0}
}
@-webkit-keyframes dos
{
0% { opacity:1;}
100% {opacity:0}
}
</style>
</code>
<p>C:\wwwroot\home\yefngs><span class="dos">_</span></p>
<style type="text/css">
.dos{ -moz-animation:dos 1s infinite;
-webkit-animation:dos 1s infinite;
}
@-moz-keyframes dos
{
0% { opacity:1;}
100% {opacity:0}
}
@-webkit-keyframes dos
{
0% { opacity:1;}
100% {opacity:0}
}
</style>
</code>