css3动画--位移加阴影
生活随笔
收集整理的這篇文章主要介紹了
css3动画--位移加阴影
小編覺得挺不錯的,現(xiàn)在分享給大家,幫大家做個參考.
animation: name duration timing-function delay iteration-count direction;
定義動畫: @keyframes mymove { from {left:0px;border-left: 0px solid #d91f24;} to {left:3px;border-left: 4px solid #d91f24; box-shadow: 0px 0px 20px rgba(150, 150, 150, 0.4);} }
| animation-name | 規(guī)定需要綁定到選擇器的 keyframe 名稱。。 |
| animation-duration | 規(guī)定完成動畫所花費的時間,以秒或毫秒計。 |
| animation-timing-function | 規(guī)定動畫的速度曲線。 |
| animation-delay | 規(guī)定在動畫開始之前的延遲。 |
| animation-iteration-count | 規(guī)定動畫應該播放的次數(shù)。 |
| animation-direction | 規(guī)定是否應該輪流反向播放動畫。 |
?
@-webkit-keyframes mymove /*Safari and Chrome*/ { from {left:0px;border-left: 0px solid #d91f24;} to {left:3px;border-left: 4px solid #d91f24;box-shadow: 0px 0px 20px rgba(150, 150, 150, 0.4);} } 通過添加類的方式觸發(fā): .brand_li{ animation:mymove 450ms ; -webkit-animation:mymove 450ms ;? ? ? //infinite? 循環(huán)播放 animation-fill-mode: forwards; //定格在動畫播放完之后 } jq添加類: $(".list_content>ul>a>li").hover( function(){ $(this).addClass("brand_li"); }, function(){ $(this).removeClass("brand_li"); } )總結
以上是生活随笔為你收集整理的css3动画--位移加阴影的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: CSS文本超出2行就隐藏并且显示省略号
- 下一篇: 快手短视频怎么赚钱 来看看这些干货