css3动画----实现动态省略号 ...
<h3>实现省略号点点动,纯css3实现动态省略号</h3>
上传中<span class="dot">...</span>
【css代码如下】
<style>
.dot {
font-family: simsun;
}
:root .dot {
display: inline-block;
width: 1.5em;
vertical-align: bottom;
overflow: hidden;
}
@-webkit-keyframes dot {
0% { width: 0; margin-right: 1.5em; }
33% { width: .5em; margin-right: 1em; }
66% { width: 1em; margin-right: .5em; }
100% { width: 1.5em; margin-right: 0;}
}
.dot {
-webkit-animation: dot 3s infinite step-start;
}
@keyframes dot {
0% { width: 0; margin-right: 1.5em; }
33% { width: .5em; margin-right: 1em; }
66% { width: 1em; margin-right: .5em; }
100% { width: 1.5em; margin-right: 0;}
}
.dot {
animation: dot 3s infinite step-start;
}
</style>