suoutsky / stepping-stone

bug dictionary
1 stars 0 forks source link

ios 不兼容 animation-play-state #3

Open suoutsky opened 6 years ago

suoutsky commented 6 years ago

目前没有很好的解决方式 只能换种方式停止动画 iOS 8-9 Safari 使用 -webkit-animation: none !important; 替代 -webkit-animation-play-state:paused; This approach is for GWD, but can apply otherwise Don't use Pause event in GWD (Google Web Designer) Create normal event that calls a javascript function, set "-webkit-animation: none !important;" to the

(you can add/remove css class) CSS Style.no-animation { -webkit-animation: none !important; } Javascriptdiv.className = div.className + " no-animation"; To resume, remove CSS classJavascriptdiv.className = div.className.replace("no-animation", ''); Please note that when remove/pause animation, it will go back to frame 0 (00:00 s), so you may need to calculate the current opacity/position for the div -- | --