日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當(dāng)前位置: 首頁 > 编程资源 > 综合教程 >内容正文

综合教程

动画-animation_html/css_WEB-ITnose(html动画)

發(fā)布時(shí)間:2023/12/15 综合教程 45 生活家
生活随笔 收集整理的這篇文章主要介紹了 动画-animation_html/css_WEB-ITnose(html动画) 小編覺得挺不錯(cuò)的,現(xiàn)在分享給大家,幫大家做個(gè)參考.

動(dòng)畫

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

1.@keyframes規(guī)則

2.animation屬性

Webkit內(nèi)核的瀏覽器(Safari,chrome)需要加-webit-前綴。

持續(xù)時(shí)間:

animation-duration

-webkit-animation-duration

時(shí)間函數(shù):

animation-timing-function

-webkit-animation-timing-function

延遲時(shí)間:

animation-delay

-webkit-animation-delay

動(dòng)畫執(zhí)行次數(shù):

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

-webkit-animation-iteration-count:

動(dòng)畫播放方向:

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

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

-webkit-animation-direction:

動(dòng)畫播放前后的狀態(tài):

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

// 默認(rèn)值 / 設(shè)置播放之前的元素狀態(tài)和第一個(gè)關(guān)鍵幀相同 / 播放后的

狀態(tài)和最后一個(gè)關(guān)鍵幀相同

-webkit-animation-fill-mode:

控制動(dòng)畫運(yùn)行或暫停:

animation-play-state: running / paused

-webkit-animation-play-state

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

所有和animation相關(guān)的樣式都可以寫在animation屬性內(nèi):

但 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;}        }

登錄后復(fù)制

總結(jié)

以上是生活随笔為你收集整理的动画-animation_html/css_WEB-ITnose(html动画)的全部?jī)?nèi)容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網(wǎng)站內(nèi)容還不錯(cuò),歡迎將生活随笔推薦給好友。