animation-play-state
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)
}
}