亚洲精品久久久中文字幕-亚洲精品久久片久久-亚洲精品久久青草-亚洲精品久久婷婷爱久久婷婷-亚洲精品久久午夜香蕉

您的位置:首頁技術(shù)文章
文章詳情頁

javascript - 移動端css動畫播放狀態(tài)暫停在ios不起作用 animation-play-state

瀏覽:111日期:2023-06-04 14:46:04

問題描述

移動端css動畫播放狀態(tài)暫停在ios不起作用 animation-play-state

我想點擊圖片圖片靜止,再點一下圖片繼續(xù)旋轉(zhuǎn)。在安卓手機上可以實現(xiàn),但是在ios,第一次點擊圖片繼續(xù)旋轉(zhuǎn),沒有靜止動作,反而在第二點擊的時候,圖片在第一次點擊的位置閃一下,繼續(xù)旋轉(zhuǎn)。

<style type='text/css'>#wls .musicCon{width: 35px;height: 35px;position:fixed;top:15px;right:15px;z-index: 9999; } img.rotate{ animation:spin 4s infinite linear; -moz-animation:spin 4s infinite linear; -webkit-animation:spin 4s infinite linear;-webkit-animation-play-state: running; -moz-animation-play-state: running; animation-play-state: running; -ms-animation-play-state: running; -o-animation-play-state: running;}@keyframes spin { 0%{ transform:rotate(0deg); } 100%{ transform:rotate(360deg); }}@-o-keyframes spin { 0% {-o-transform: rotate(0deg); } 100%{ -o-transform:rotate(360deg); }}@-moz-keyframes spin { 0% {-moz-transform: rotate(0deg); } 100%{ -moz-transform:rotate(360deg); }}@-webkit-keyframes spin { 0% {-webkit-transform: rotate(0deg); } 100%{ -webkit-transform:rotate(360deg); }} img.pauseWalk { animation:spin 4s infinite linear; -moz-animation:spin 4s infinite linear; -webkit-animation:spin 4s infinite linear; -webkit-animation-play-state: paused; -moz-animation-play-state: paused; animation-play-state: paused; -ms-animation-play-state: paused; -o-animation-play-state: paused;}</style><body id='wls'> <img src='http://www.aoyou183.cn/wenda/imgage/music.png' /> <audio autoplay='autoplay' loop='loop' id='bgm'> <source src='http://www.aoyou183.cn/wenda/music/bgm.mp3' type='audio/mpeg'> <source src='http://www.aoyou183.cn/wenda/music/bgm.ogg' type='audio/ogg'></audio><script> var num=1; $('#wls .musicCon').bind('click',function(){if(num==1){ $(this).removeClass('rotate'); $(this).addClass('pauseWalk'); $('#bgm')[0].pause(); num++; return num;}else{ $(this).removeClass('pauseWalk'); $(this).addClass('rotate'); $('#bgm')[0].play(); num=1; return num;} })</script></body>

問題解答

回答1:

iOS 上 animation-play-state 失效.

你可以把狀態(tài)疊加. 如下示例:鏈接描述

標簽: JavaScript
相關(guān)文章:
主站蜘蛛池模板: 欧美一二三区视频 | 亚洲图区综合网 | 亚洲成人免费网址 | 九色91蝌蚪 | 综合国产在线 | 久久黄色网 | 日韩黑寡妇一级毛片国语对白 | 亚洲精品影视 | 欧美日本一道本 | 国产综合色在线视频播放线视 | 国产一二三四区中 | 久久久久国产精品免费免费 | 久久国产99| 国产午夜精品理论片久久影视 | 大毛片a大毛片 | 欧美r级限制禁片在线观看 欧美va在线高清 | 黄色激情毛片 | 婷婷丁香在线视频 | 11111日本网站 | 久久99精品久久久久久秒播 | 色视频在线观看在线播放 | 中文字幕婷婷 | 国产精品区免费视频 | 欧美3d人妖交 | 欧美成人全部免费观看1314色 | 国产成人精品免费视频大全软件 | 婷婷夜色| 亚洲乱码中文字幕久久 | 免费日本黄色 | 一级a做爰片欧欧美毛片4 | 黄色一级片性生活 | 成年女人视频播放免费观看 | 一级黄色片大全 | 99这里有精品 | 我要看黄色录像一级片 | 中文永久免费看电视网站入口 | 成 人 黄 色 大 片 | 亚洲一区二区在线免费观看 | 色综合中文 | 国产三级电影院 | 黄色va|