H5常用动画解决方案
匀速旋转效果
#obj{ -webkit-animation:Rotate 2s linear infinite; } @-webkit-keyframes Rotate { from {transform:rotate(0deg);-webkit-transform:rotate(0deg);} to {transform:rotate(360deg);-webkit-transform:rotate(360deg);} }
渐出变大效果
#obj{ -webkit-animation:share_icon 1s linear; } @-webkit-keyframes share_icon { 0% {-webkit-transform: scale(0.5); opacity:0} 100% {-webkit-transform: scale(1); opacity:1} }
呼吸灯动画
#obj{ -webkit-animation:share_icon 1s linear infinite; } @-webkit-keyframes share_icon { 0% {opacity:0} 50% { opacity:1} 100% { opacity:0} }
监听动画结束
obj.addEventListener('webkitAnimationEnd', function(){ // do something })
相关推荐
Ladyseven 2020-10-22
mapaler 2020-07-17
云端漂移 2020-07-17
淡风wisdon大大 2020-06-27
lanzhusiyu 2020-06-21
AlisaClass 2020-06-05
jiedinghui 2020-06-04
usepython 2020-05-31
flycony 2020-05-30
88284453 2020-05-09
hqulyc 2020-05-05
yaodilu 2020-04-30
冰蝶 2020-04-20
vavid 2020-04-20
AlisaClass 2020-04-11
ELEMENTS爱乐小超 2020-04-07
lcyangcss 2020-03-28