wxml

<view class='game_point_me {{isDoudong?"doudong":""}}' bindtap='pointMe'></view>

wxss

@keyframes seconddiv{
0% {transform: scale(1.4,1.4);}
10% {transform: scale(1,1);}
25% {transform: scale(1.2,1.2);}
50% {transform: scale(1,1);}
70% {transform: scale(1.2,1.2);}
100% {transform: scale(1,1);}
}
.doudong{animation:1s seconddiv;}
.game_point_me{width: 98rpx;height: 89rpx; background: url(https://game003.workshop.xmtcyx.com/images/game/game_point_me01.png)no-repeat;background-size: 100% 100%;position: absolute;top: 180rpx;right: 50rpx;}

js

let that
Page({
  data: {
    isDoudong: false, //控制图片抖动
  },
  onLoad: function(options) {
    that = this
    //抖动相关的
    setInterval(function() {
      let isDoudong = that.data.isDoudong
      that.setData({
        isDoudong: !isDoudong
      })
    }, 1000)
  }
})

 

相关文章:

  • 2021-09-11
  • 2021-04-20
  • 2021-09-20
  • 2021-09-25
  • 2021-10-27
  • 2021-08-19
  • 2021-09-14
猜你喜欢
  • 2021-12-26
  • 2021-11-30
  • 2021-12-26
  • 2021-12-26
  • 2021-12-31
  • 2021-08-11
相关资源
相似解决方案