animation应用
来源:互联网 发布:异界大巫txt吾知 编辑:程序博客网 时间:2024/06/11 03:32
- animation的属性如下图所示:
2.如下是所示代码:
<!DOCTYPE html><html><head><meta charset="utf-8"> <title>zyy</title><style> div{ width:100px; height:100px; background:red; position:relative; animation-name:myfirst; animation-duration:5s; animation-timing-function:linear; animation-delay:2s; animation-iteration-count:infinite; /*表示循环*/ animation-direction:alternate; /*表示奇数次正向循环,偶数次反向循环*/ animation-play-state:running; /* Safari and Chrome: */ -webkit-animation-name:myfirst; -webkit-animation-duration:5s; -webkit-animation-timing-function:linear; -webkit-animation-delay:2s; -webkit-animation-iteration-count:infinite; -webkit-animation-direction:alternate; -webkit-animation-play-state:running;}@keyframes myfirst{ 0% {background:red; left:0px; top:0px;} 25% {background:yellow; left:200px; top:0px;} 50% {background:blue; left:200px; top:200px;} 75% {background:green; left:0px; top:200px;} 100% {background:red; left:0px; top:0px;}}@-moz-keyframes myfirst /* Firefox */{ 0% {background:red; left:0px; top:0px;} 25% {background:yellow; left:200px; top:0px;} 50% {background:blue; left:200px; top:200px;} 75% {background:green; left:0px; top:200px;} 100% {background:red; left:0px; top:0px;}}@-webkit-keyframes myfirst /* Safari and Chrome */{ 0% {background:red; left:0px; top:0px;} 25% {background:yellow; left:200px; top:0px;} 50% {background:blue; left:200px; top:200px;} 75% {background:green; left:0px; top:200px;} 100% {background:red; left:0px; top:0px;}}@-o-keyframes myfirst /* Opera */{ 0% {background:red; left:0px; top:0px;} 25% {background:yellow; left:200px; top:0px;} 50% {background:blue; left:200px; top:200px;} 75% {background:green; left:0px; top:200px;} 100% {background:red; left:0px; top:0px;}}</style></head><body><div></div></body></html>
3.由于animation的功能很多,当然可以针对animation简写成如下形式:
animation:myfirst 5s linear 2s infinite alternate; /* Firefox: */ -moz-animation:myfirst 5s linear 2s infinite alternate; /* Safari and Chrome: */ -webkit-animation:myfirst 5s linear 2s infinite alternate; /* Opera: */ -o-animation:myfirst 5s linear 2s infinite alternate;
0 0
- animation应用
- Android 中的 Animation 应用
- Android 中的 Animation 应用
- Android中的Animation应用
- css3 animation 动画应用
- Android中的Animation应用
- Android 中的 Animation 应用
- android animation的应用实例
- android animation的应用实例
- android animation的应用实例
- animation的具体应用详解
- Android 动画 Animation应用详解
- 【JQ】JQ Animation-Slide应用
- android animation的两种应用实例
- 转]android animation的应用实例
- Android开发之Animation应用(二)
- [转]android animation的应用实例
- Android应用开发——Property Animation
- 【hql】A different object with the same identifier value was already associated with the session
- CSS中block、inline和inline-block
- 期末总结
- 网络连接评分机制之NetworkMonitor
- 有关EmguCV使用技巧的简单汇总
- animation应用
- 网络连接评分机制之再谈WIFI与数据切换过程
- Markdown 11种基本语法
- 【mysql】mysql搜索所有树形结构的节点
- 否定伪类(:not) :empty选择器
- School Marks CodeForces - 540B
- CentOS下利用mono+xsp架构asp.net环境
- 【easyui】datagrid中增加进度条
- android性能优化(一)内存优化