九九热线视频精品99-动漫高h纯肉无码视频在线观看-午夜理论无码片在线观看免费-99精品国产在热久久无码-亚洲国产成人乱码

css3 animation動畫特效插件的巧用

2016/11/9 8:32:52   閱讀:1795    發布者:1795

  這一個是css3  animation動畫特效在線演示的網站 https://daneden.github.io/animate.css/

  下載 animate.css文件,文件的代碼很多,不過要明白那是很多特效的CSS樣式,
如果只使用到其中的一兩個特效,可以選擇性的復制。

 

首先是公共的樣式:

.animated { 
  -webkit-animation-duration: 1s; 
  animation-duration: 1s; 
  -webkit-animation-fill-mode: both; 
  animation-fill-mode: both; 
} 

.animated.infinite { 
  -webkit-animation-iteration-count: infinite; 
  animation-iteration-count: infinite; 
}
.animated定義了動畫的持續時間;
.animated.infinite定義了循環動畫,如果只要求播放一次就不需要添加該樣式
下面是每個特效的樣式,舉幾個例子:
  • 彈跳特效 bound
@-webkit-keyframes bounce { 
  from, 20%, 53%, 80%, to { 
    -webkit-animation-timing-function: cubic-bezier(0.215, 0.610, 0.355, 1.000); 
    animation-timing-function: cubic-bezier(0.215, 0.610, 0.355, 1.000); 
    -webkit-transform: translate3d(0,0,0); 
    transform: translate3d(0,0,0); 
  } 

  40%, 43% { 
    -webkit-animation-timing-function: cubic-bezier(0.755, 0.050, 0.855, 0.060); 
    animation-timing-function: cubic-bezier(0.755, 0.050, 0.855, 0.060); 
    -webkit-transform: translate3d(0, -30px, 0); 
    transform: translate3d(0, -30px, 0); 
  } 

  70% { 
    -webkit-animation-timing-function: cubic-bezier(0.755, 0.050, 0.855, 0.060); 
    animation-timing-function: cubic-bezier(0.755, 0.050, 0.855, 0.060); 
    -webkit-transform: translate3d(0, -15px, 0); 
    transform: translate3d(0, -15px, 0); 
  } 

  90% { 
    -webkit-transform: translate3d(0,-4px,0); 
    transform: translate3d(0,-4px,0); 
  } 
} 

@keyframes bounce { 
  from, 20%, 53%, 80%, to { 
    -webkit-animation-timing-function: cubic-bezier(0.215, 0.610, 0.355, 1.000); 
    animation-timing-function: cubic-bezier(0.215, 0.610, 0.355, 1.000); 
    -webkit-transform: translate3d(0,0,0); 
    transform: translate3d(0,0,0); 
  } 

  40%, 43% { 
    -webkit-animation-timing-function: cubic-bezier(0.755, 0.050, 0.855, 0.060); 
    animation-timing-function: cubic-bezier(0.755, 0.050, 0.855, 0.060); 
    -webkit-transform: translate3d(0, -30px, 0); 
    transform: translate3d(0, -30px, 0); 
  } 

  70% { 
    -webkit-animation-timing-function: cubic-bezier(0.755, 0.050, 0.855, 0.060); 
    animation-timing-function: cubic-bezier(0.755, 0.050, 0.855, 0.060); 
    -webkit-transform: translate3d(0, -15px, 0); 
    transform: translate3d(0, -15px, 0); 
  } 

  90% { 
    -webkit-transform: translate3d(0,-4px,0); 
    transform: translate3d(0,-4px,0); 
  } 
} 

.bounce { 
  -webkit-animation-name: bounce; 
  animation-name: bounce; 
  -webkit-transform-origin: center bottom; 
  transform-origin: center bottom; 
}

在html頁面使用,可以對文字、圖片等其他元素使用,下面的效果是一張持續跳動的圖片

<img src="returnTop.png" class="animated infinite bounce">
  • 閃爍特效 flash
@-webkit-keyframes flash { 
  from, 50%, to { 
    opacity: 1; 
  } 

  25%, 75% { 
    opacity: 0; 
  } 
} 

@keyframes flash { 
  from, 50%, to { 
    opacity: 1; 
  } 

  25%, 75% { 
    opacity: 0; 
  } 
} 

.flash { 
  -webkit-animation-name: flash; 
  animation-name: flash; 
}
  • 搖擺特效 swing
@-webkit-keyframes swing { 
  20% { 
    -webkit-transform: rotate3d(0, 0, 1, 15deg); 
    transform: rotate3d(0, 0, 1, 15deg); 
  } 

  40% { 
    -webkit-transform: rotate3d(0, 0, 1, -10deg); 
    transform: rotate3d(0, 0, 1, -10deg); 
  } 

  60% { 
    -webkit-transform: rotate3d(0, 0, 1, 5deg); 
    transform: rotate3d(0, 0, 1, 5deg); 
  } 

  80% { 
    -webkit-transform: rotate3d(0, 0, 1, -5deg); 
    transform: rotate3d(0, 0, 1, -5deg); 
  } 

  to { 
    -webkit-transform: rotate3d(0, 0, 1, 0deg); 
    transform: rotate3d(0, 0, 1, 0deg); 
  } 
} 

@keyframes swing { 
  20% { 
    -webkit-transform: rotate3d(0, 0, 1, 15deg); 
    transform: rotate3d(0, 0, 1, 15deg); 
  } 

  40% { 
    -webkit-transform: rotate3d(0, 0, 1, -10deg); 
    transform: rotate3d(0, 0, 1, -10deg); 
  } 

  60% { 
    -webkit-transform: rotate3d(0, 0, 1, 5deg); 
    transform: rotate3d(0, 0, 1, 5deg); 
  } 

  80% { 
    -webkit-transform: rotate3d(0, 0, 1, -5deg); 
    transform: rotate3d(0, 0, 1, -5deg); 
  } 

  to { 
    -webkit-transform: rotate3d(0, 0, 1, 0deg); 
    transform: rotate3d(0, 0, 1, 0deg); 
  } 
} 

.swing { 
  -webkit-transform-origin: top center; 
  transform-origin: top center; 
  -webkit-animation-name: swing; 
  animation-name: swing; 
}

 

  還有很多animation 動畫特效,可以在 animate.css 網站查看,每一個特效的名字剛好也是
樣式定義的類名、動畫幀名,可以一一對應。也可以在該網站下載最新版的 animate.css文件。

 

  溫馨提示:animation 是css3的特性,支持的是最新的主流瀏覽器,上述插件是 支持-webkit內核的瀏覽器,
如果想支持其他的最新瀏覽器,請自行添加相應瀏覽器供應商前綴的動畫幀。

 

  animate.css文件網盤下載:https://pan.baidu.com/s/1sl6c1uX

 
主站蜘蛛池模板: 又长又大又粗又硬3p免费视频| 久久綾合久久鬼色88| 26uuu另类亚洲欧美日本| 激情内射亚洲一区二区三区爱妻| 米奇欧美777四色影视在线| 51午夜精品免费视频| 国产在线视频主播区| 五月开心播播网| 欧美交换配乱吟粗大免费看| 久久国产福利国产秒拍飘飘网 | 国产伦子沙发午休系列资源曝光| 2020无码天天喷水天天爽| 性一交一乱一伦一色一情丿按摩| 一本大道东京热无码av| 中国大陆高清aⅴ毛片| 丝袜自慰一区二区三区| 99精品国产自在现线10页| 夜夜爽一区二区三区精品| 2021亚洲国产精品无码| 久久久欧美精品激情| 欧美黑人xxxx又粗又长| 国产欧美亚洲精品第二区软件| 亚洲另类春色国产精品| 水蜜桃av导航| 国产精华av午夜在线观看| 国产精品亚韩精品无码a在线| 国产成人夜色高潮福利app| 国产精品美女久久久久久久| 最新亚洲中文av在线不卡| 2021精品亚洲中文字幕| 狠狠色噜噜狠狠狠狠97| 四虎影视在线观看2413| 久久综合狠狠综合久久| 日产精品久久久久久久性色 | 熟妇熟女乱妇乱女网站| 亚洲人成网线在线播放| 欧美性猛交xxxx乱大交极品| 亚洲美女做爰av人体图片| 久久www色情成人免费| 曰批免费视频播放免费直播| 日日噜噜夜夜爽爽|