animation ios手機無法暫停

來源:互聯網
上載者:User

標籤:mat   otto   step   ack   css   web   absolute   .com   no-repeat   

.arrow {
position: absolute;
top: 0;
left: -25%;
width: 157px;
height: 42px;
background: url(../images/zhizhen.png) no-repeat;
transform-origin: 144px 21px;
-webkit-transform-origin: 144px 21px;
-webkit-transform: rotate(45deg);
transform: rotate(45deg);
animation: dong 1s linear alternate infinite;
-webkit-animation: dong 1s linear alternate infinite;
/*animation-fill-mode: forwards;*/
/*-webkit-animation-fill-mode: forwards;*/
}

@keyframes dong {
0% {
transform: rotateZ(45deg);
}
100% {
transform: rotateZ(135deg);
}

}

@-webkit-keyframes dong {
0% {
-webkit-transform: rotateZ(45deg);
}
100% {
-webkit-transform: rotateZ(135deg);
}

}



上述代碼 發現用
$(‘.arrow‘).css({
"webkitAnimationPlayState": "paused"
});
無法控制暫停
其他動畫都可以控制暫停
@keyframes energydong {
0% {
bottom: 0;
}
100% {
bottom: 370px;
}
}
@-webkit-keyframes energydong {
0% {
bottom: 0;
}
100% {
bottom: 370px;
}
}

這樣寫可以。開始以為我寫的有問題,可是怎樣弄不行,後來我百度了才知道,大家也有類似問題,
解決辦法是:
圖片改為順序圖表,以主要畫面格的形式建立動畫,這樣設定animation-play-state就有效了,css代碼如下:
animation: dong 1s steps(15) alternate infinite;
-webkit-animation: dong 1s steps(15) alternate infinite;


參考解決文章是:
http://www.cnblogs.com/xunhuang/p/6869103.html










animation ios手機無法暫停

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.