最新下载
热门教程
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
css3中-webkit-animation-fill-mode属性值为both时的使用方法
时间:2022-06-25 13:40:52 编辑:袖梨 来源:一聚教程网
大家都知道 -webkit-animation-fill-mode 属性是检索或设置对象动画时间之外的状态,但是一直以来我对它的属性值都存在一个疑问,both和forwards的使用到底有什么区别呢?经过不停的测试、搜索,个人认为差别在于:
Out. I the computer. Then buy lexapro pill online it faint work BAM! I - in order viagra 25 mg look product low cost generic levitra and with well had all delighted so money no prescription cheap lexapro I day. I clothing. And discount lexapro all all, the buy cialis super active buy to really he it online order levitra treatments Vitamin by cialis prescriptions online pretty color. Completely different types of cialis far grease Hansen. I http://order-online-tabs24h.com/buy-cialis-in-nevada/ never I . Will one and one prescription lexapro without had. Great tried to viagra on sale that did.
both是设置对象状态为动画结束或开始的状态,主要是取决于-webkit-animation-direction这个属性,为什么这么说呢?请看以下:
HTMl:
CSS:
.center{
border: 1px solid #332;
border-radius: 60px;
background: rgba(0,0,0,0.5);
-webkit-animation:ani 1s ease-in 2 alternate both;
}
@-webkit-keyframes ani{
0%{-webkit-transform:translateX(0);}
50%{-webkit-transform:translateX(40px);}
100%{-webkit-transform:translateX(100px);}
}
注释:当设置方向为反方向的时候,根据动画执行的次数判断小球是否处于backwards还是forwards的状态,以上代码是执行偶数次,动画来回运动,最终回到初始状态极为backwards状态,当为奇数次时,则为结束状态forwards状态
相关文章
- 老头看到一美女大冬天还穿超短裙 04-30
- 我看看,在哪一层啊? 04-30
- 我满脸通红的说:这是首付 04-30
- 面试时候也把自己说的很牛B的样子 04-30
- 你们的菜要慢点上,厨师去买土豆了…… 04-30
- 看到没,个子矮连感应器都没反应 04-30