animation-play-state
发布于 5 年前 作者 xieyang 10846 次浏览 来自 问答

animation-play-state属性在iOS上不起作用

<image src=https://xcx1.diaocr.com/temp/2018/0621/m_21165732936430.jpg class=‘rotate’ style=‘animation-play-state:{{is_paused?“paused”:“running”}}; -webkit-animation-play-state:{{is_paused?“paused”:“running”}};’ bindtap=“tab”></image>

Page({

data: {

is_paused: false

},

onLoad: function () {

},

tab(){

this.setData({

is_paused: !this.data.is_paused

})

}

})

.rotate{

animation: rotate 30s infinite;

}

@keyframes rotate{

10%{

transform: rotate(10deg)

}

100%{

transform: rotate(360deg)

}

}

1 回复

是个已知的iOS系统的bug,在使用transform的情况下animation-play-state不生效

回到顶部