css3动画使用技巧之——transform-delay为负值时的应用。
<html> <head> <title>css3动画delay为负值时的效果</title> <meta charset="UTF-8"/> <style type="text/css"> .he{ width: 400px; height: 200px; background: #eee; margin: 0 auto; text-align: center; line-height: 200px; } .he div{ width: 4px; height: 30px; background-color: green; display: inline-block; animation-name: myniy; animation-duration: 1.2s; animation-iteration-count: infinite; -webkit-animation-name: myniy; -webkit-animation-duration: 1.2s; -webkit-animation-iteration-count: infinite; -moz-animation-duration: 1.2s; -moz-animation-name: myniy; -moz-animation-iteration-count: infinite; } .m1{ animation-delay: -1.1s; -webkit-animation-delay: -1.1s; -moz-animation-delay: -1.1s; } .m2{ animation-delay: -1.0s; -webkit-animation-delay: -1.0s; -moz-animation-delay: -1.0s; } .m3{ animation-delay: -0.9s; -webkit-animation-delay: -0.9s; -moz-animation-delay: -0.9s; } .m4{ animation-delay: -0.8s; -webkit-animation-delay: -0.8s; -moz-animation-delay: -0.8s; } .m5{ animation-delay: -0.7s; -webkit-animation-delay: -0.7s; -moz-animation-delay: -0.7s; } .m6{ animation-delay: -0.6s; -webkit-animation-delay: -0.6s; -moz-animation-delay: -0.6s; } @keyframes myniy{ 0%,30%,70%,100%{ transform: scale(1,0.5); } 50%{ transform: scale(1); } } @-webkit-keyframes myniy{ 0%,30%,70%,100%{ transform: scale(1,0.5); } 50%{ transform: scale(1); } } @-moz-keyframes myniy{ 0%,30%,70%,100%{ transform: scale(1,0.5); } 50%{ transform: scale(1); } } </style> </head> <body> <div class="he"> <div class="m1"></div> <div class="m2"></div> <div class="m3"></div> <div class="m4"></div> <div class="m5"></div> <div class="m6"></div> </div> </body></html>
运行效果图
animation-delay为负值时表示,动画跳过多少秒进入动画周期。
上面要注意的地方,关键帧对称
0%,30%,70%,100%{
transform: scale(1,0.5);
}
50%{
transform: scale(1);
}延迟为-(1.2-0.1)开始
css3动画使用技巧之——transform-delay为负值时的应用。的更多相关文章
- css3动画使用技巧之—JQ配合css3实现轮播之animation-delay应用
<!DOCTYPE html> <html> <head> <title>css3动画使用技巧之—JQ配合css3实现轮播之animation-dela ...
- 用css3动画 @keyframes里设置transform:rotate(); 控制动画暂停和运动用属性:animation-play-state:paused暂停,在微信和safari里设置paused无效,在QQ里是正常的
这几天遇到了两个很奇葩的问题,终于找到原因,趁还记得解决方法,赶紧记下来: 用css3动画 @keyframes里设置transform:rotate(); 控制动画暂停和运动可以用属性:animat ...
- css3动画使用技巧之—border旋转时的应用。
<html> <head> <title>css3动画border旋转时的应用.</title> <meta charset="UTF- ...
- CSS3动画属性:变形(transform)
Transform字面上就是变形,改变的意思.在CSS3中transform主要包括以下几种:旋转rotate.扭曲skew.缩放scale和移动translate以及矩阵变形matrix. 语法 t ...
- css3动画属性系列之transform细讲scale缩放
下面我们从3个方面开始介绍: 1.scale(x,y) 对元素进行缩放 X表示水平方向缩放的倍数 | Y表示垂直方向的缩放倍数 Y是一个可选参数,没有设置的话,则表示X,Y两个方向的缩放倍数是一样的. ...
- css3动画属性系列之transform细讲旋转rotate
1.语法: transform: none | <transform-function> [<transform-function>]* 2.取值: none ...
- CSS3动画理解与应用
CSS3动画理解与应用 Transform:对元素进行变形:Transition:对元素某个属性或多个属性的变化,进行控制(时间等),类似flash的补间动画.但只有两个关键贞.开始,结束.Anima ...
- css3中的变形(transform)、过渡(transtion)、动画(animation)
Transform字面上就是变形,改变的意思.在CSS3中transform主要包括以下几种:旋转rotate.扭曲skew.缩放scale和移动translate以及矩阵变形matrix.下面我们一 ...
- 使用transform和transition制作CSS3动画
<!DOCTYPE HTML> <html lang="en-US"> <head> <meta charset="UTF-8& ...
随机推荐
- PowerShell运行cmd命令
1.使用.exe扩展名 2.使用 cmd /c "" 3.在 PowerShell v3 中有另一种选择来解决这个问题,只需在命令行的任意位置添加 –% 序列(两个短划线和一个百分 ...
- 【转】C++中的虚函数的实现
转自:http://blog.csdn.net/haoel/article/details/1948051 对C++ 了解的人都应该知道虚函数(Virtual Function)是通过一张虚函数表(V ...
- MySQL启动和关闭服务命令
MySQL启动和关闭服务命令 1.启动服务命令 net start mysql 2.关闭服务命令 net stop mysql
- Unix/Linux环境C编程新手教程(12) openSUSECCPP以及Linux内核驱动开发环境搭建
1. openSUSE是一款优秀的linux. watermark/2/text/aHR0cDovL2Jsb2cuY3Nkbi5uZXQvaXRjYXN0Y3Bw/font/5a6L5L2T/font ...
- hello world是怎样运行的?
关于<深入理解计算机系统> “这本书的中译名为“深入理解计算机系统”,我非常,十分,以及百分之一百二十地不满意.我这么说的原因在于这个译法完全扭曲了书的本意.如果直译原书名,应该是类似于“ ...
- Java编程思想第四版*第七章*个人练习
欢迎加群:239063848 成团的笔记:该组仅用于技术共享和交流,问题和答案公布 潘基聊天.禁止广告.禁止招聘-- 练习1:(2)创建一个简单的类.第二个类中,将一个引用定义为第一个类的对象.运用惰 ...
- Foundation: NSNotificationCenter
一个NSNotificationCenter对象(通知中心)提供了在程序中广播消息的机制,它实质上就是一个通知分发表.这个分发表负责维护为各个通知注册的观察者,并在通知到达时,去查找相应的观察者,将通 ...
- 编程以外积累: 如何给项目生成类似VS2008的说明文档
1:[下载] 目前微软提供的官方开源工具 Sandcastle结果跑到项目中一看,抬头就来了这么一段: The Sandcastle CodePlex project is no longer und ...
- iOS之Sqlite和FMDB
在iOS 开发中,总会用到数据库的操作,来实现增.删.改.查. 尤其是查询. 一旦涉及到查询的操作,那就非得用数据库不可了. SQLite (http://www.sqlite.org/docs. ...
- iOS开发UI篇-tableView在编辑状态下的批量操作(多选)
先看下效果图 直接上代码 #import "MyController.h" @interface MyController () { UIButton *button; } @pr ...