最新文章专题视频专题问答1问答10问答100问答1000问答2000关键字专题1关键字专题50关键字专题500关键字专题1500TAG最新视频文章推荐1 推荐3 推荐5 推荐7 推荐9 推荐11 推荐13 推荐15 推荐17 推荐19 推荐21 推荐23 推荐25 推荐27 推荐29 推荐31 推荐33 推荐35 推荐37视频文章20视频文章30视频文章40视频文章50视频文章60 视频文章70视频文章80视频文章90视频文章100视频文章120视频文章140 视频2关键字专题关键字专题tag2tag3文章专题文章专题2文章索引1文章索引2文章索引3文章索引4文章索引5123456789101112131415文章专题3
当前位置: 首页 - 科技 - 知识百科 - 正文

动画-animation_html/css

来源:动视网 责编:小采 时间:2020-11-27 16:39:49
文档

动画-animation_html/css

动画-animation_html/css_WEB-ITnose:动画 ===================================================================================== 1.@keyframes规则 2.animation属性 Webkit内核的浏览器(Safari,chrome)需要加-webit-前缀。 持续时间: animatio
推荐度:
导读动画-animation_html/css_WEB-ITnose:动画 ===================================================================================== 1.@keyframes规则 2.animation属性 Webkit内核的浏览器(Safari,chrome)需要加-webit-前缀。 持续时间: animatio


动画

=====================================================================================

1.@keyframes规则


2.animation属性


Webkit内核的浏览器(Safari,chrome)需要加-webit-前缀。


持续时间:

animation-duration

-webkit-animation-duration


时间函数:

animation-timing-function

-webkit-animation-timing-function


延迟时间:

animation-delay

-webkit-animation-delay


动画执行次数:

animation-iteration-count: count / infinite(无限次)

-webkit-animation-iteration-count:


动画播放方向:

animation-direction: normal / reverse /alternate / alternate-reverse

//正常 / 反向 / 第一次正常第二次反向 / 第一次反向第二次正常

-webkit-animation-direction:


动画播放前后的状态:

animation-fill-mode: none / backwards / forwards /both

// 默认值 / 设置播放之前的元素状态和第一个关键帧相同 / 播放后的

状态和最后一个关键帧相同

-webkit-animation-fill-mode:


控制动画运行或暂停:

animation-play-state: running / paused

-webkit-animation-play-state


*****************************************************************************************

所有和animation相关的样式都可以写在animation属性内:

但 1. 至少要有animation-name 和 animation-duration

2. animation-duration在animation-delay之前


 div{ height:100px; width:100px; background: url(images/ball.png); background-size:99.5%; animation:myball_1 6s linear infinite alternate, myball_2 6s linear infinite; -webkit-animation:myball_1 6s linear infinite alternate, myball_2 6s linear infinite; animation-play-state:running; -webkit-animation-play-state:running; } div:hover{ animation-play-state:paused; -webkit-animation-play-state:paused; } @keyframes myball_1{ 100%{ transform :rotate(360deg);} } @-webkit-keyframes myball_1{ 100%{transform:rotate(360deg);} } @keyframes myball_2{ 0%,50%,100%{ opacity :1;} 25%,75%{ opacity:0 ;} } @-webkit-keyframes myball_2{ 0%,50%,100%{opacity:1;} 25%,75%{opacity:0;} }

文档

动画-animation_html/css

动画-animation_html/css_WEB-ITnose:动画 ===================================================================================== 1.@keyframes规则 2.animation属性 Webkit内核的浏览器(Safari,chrome)需要加-webit-前缀。 持续时间: animatio
推荐度:
标签: 动画 css animation
  • 热门焦点

最新推荐

猜你喜欢

热门推荐

专题
Top