| css给我们新增加了很多的属性样式,默认是属性0。还有infinite(无限循环) |
animation-direction | 规定动画是否在下一周期逆向播放,保持forwards回到起始backwards |
3.代码演示
div { width: 100px; height: 100px; background-color: aquamarine; /* 动画名称 */ animation-name: move; /* 动画花费时长 */ animation-duration: 2s; /* 动画速度曲线 */ animation-timing-function: ease-in-out; /* 动画等待多长时间执行 */ animation-delay: 2s; /* 规定动画播放次数 infinite: 无限循环 */ animation-iteration-count: infinite; /* 是属性否逆行播放 */ animation-direction: alternate; /* 动画结束之后的状态 */ animation-fill-mode: forwards; }
div:hover { /* 规定动画是否暂停或者播放 */ animation-play-state: paused; } |
除了animation-play-state属性。属性默认是属性"running",还有"paused"。
1.动画调用
(1) 什么是属性动画
动画是 CSS3中最具颠覆性的特征之一,(必须的属性)