鼠年全马铁人挑战 WEEK 16: CSS Animation

CSS3 中有两个用来做动画的属性,一个是 Transition,另一个是 Animation。

Animation 起手式

div{     animation: sample 2s ;//八个属性中至少要有名称、时间}//设定开始与结束状态@keyframes change{    from{ background:red}    to{ background: yellow;}}from 就是0%,to 为100%。
animation-name:动画名称animation-duration:动画持续时间,预设 0,单位 s 或 ms。animation-delay:动画延迟播放时间,预设 0,单位 s 或 ms。animation-iteration-count:动画播放次数,预设 1。animation-timing-function:动画加速度函式,预设 ease。animation-direction:动画播放方向,预设 normal。animation-fill-mode:动画播放前后模式,预设 none。animation-play-state:动画播放或暂停状态,预设 running。
实作球滚动範例

关于作者: 网站小编

码农网专注IT技术教程资源分享平台,学习资源下载网站,58码农网包含计算机技术、网站程序源码下载、编程技术论坛、互联网资源下载等产品服务,提供原创、优质、完整内容的专业码农交流分享平台。

热门文章