css3 animation 动画应用2 —— 打字效果
来源:互联网 发布:词云图制作软件 编辑:程序博客网 时间:2024/05/16 01:40
来源:http://www.smashingmagazine.com/2014/04/15/understanding-css-timing-functions/
<p class="text"></p>
上面的这篇文章中介绍了很多css3的动画效果,这里节选其中的打字效果
<!DOCTYPE html><html><head><meta http-equiv="Content-Type" content="text/html" charset="utf-8" /><title>Font Step Show</title><style type="text/css">@-webkit-keyframes typing { from { width: 0; } }@keyframes typing { from { width: 0; } }@-webkit-keyframes cursor { 50% { border-color: transparent; } }@keyframes cursor { 50% { border-color: transparent; } }.text {width: 0;border-right: .1em solid;overflow: hidden;font: 5em monospace;margin-top: 50px;-webkit-animation: cursor 1s step-end infinite;animation: cursor 1s step-end infinite;}#go:target .text {width: 6.6em;width: 11ch; /* Number of characters */-webkit-animation: typing 8s steps(11),cursor 1s step-end infinite;animation: typing 8s steps(11),cursor 1s step-end infinite;}a {padding: 5px 10px;background: blue;color: #fff;border-radius: 8px;text-decoration: none;font: .9em Arial;margin-top: 10px;display: inline-block;}a:hover {opacity: 0.6;}</style></head><body><div id="go"><a href="#go">Start</a><a href="#reset">Reset</a><p class="text">smashingmag</p></div></body></html>
<p class="text"></p>
中的字数必须和css中steps()中的值一致,
动画cursor是鼠标一闪一闪的效果
动画typing是字一个一个出现的效果
0 0
- css3 animation 动画应用2 —— 打字效果
- animation属性——css3动画效果
- CSS3 animation 动画效果
- CSS3动画效果animation
- css3 animation 动画应用
- css3之动画效果animation
- css3 loading动画之打字效果
- 纯CSS3属性animation实现的打字效果
- CSS3笔记——动画 animation
- Android 动画效果——Animation 动画
- CSS3 animation动画实现轮播图效果
- CSS3 动画效果专辑(animation)
- CSS3——动画效果
- 动画效果 打字延迟
- 浅谈CSS3新特性——动画animation
- CSS3动画——@keyframes规则和animation属性
- Android动画开发——Animation动画效果
- Android动画开发——Animation动画效果
- 联动添加redmine的wik
- UE工具使用
- svn配置详解
- freemark改为热部署
- POJ 3368--Frequent values
- css3 animation 动画应用2 —— 打字效果
- node建立一个简单的博客
- ios xmpp 发送语音图片解决方案
- Linux的 lsof 命令详解
- UILabel、UITextView根据字符串动态计算高度
- IOS——获取CellID以及LAC
- ListView
- 读取BMP图像每一像素点RGB数据
- 检查文本中是否包含电话号码,并且可以拨出