今天高洁为大家介绍怎么用CSS实现简单的打字效果~~
css代码如下:
.print { width: 100%; white-space: nowrap; overflow: hidden; -webkit-animation: dy 3s steps(60, end) infinite; animation: dy 3s steps(50, end) infinite; } @-webkit-keyframes dy { from { width: 0; } } @keyframes dy { from { width: 0; } }
接着是html一个P标签:
只需要几行代码就可以实现简单的打字效果哦~怎么样,好玩吗~