收藏
回答

animation-play-state在ios中的问题

animation-play-state在ios中失效无法解决,又不能直接操作wxml,怎么解决?

回答关注问题邀请回答
收藏

4 个回答

  • 晨
    2017-07-10

    怀疑是iOS本身的问题。建议测试一下iOS下普通网页是否有相同问题。

    2017-07-10
    有用
    回复
  • 晨
    2017-07-10

    请详细描述问题,并提供可复现问题的代码示例。

    2017-07-10
    有用
    回复
  • 欢乐马
    欢乐马
    2017-07-10

    旋转(播放暂停会出现卡顿BUG,安卓跟微信开发工具没有出现)

    2017-07-10
    有用
    回复
  • 欢乐马
    欢乐马
    2017-07-10

    index.js


    //index.js

    Page({

      data: {

        playing:false

      },

      bingclick: function (e) {

        if (this.data.playing) {

          this.setData({ playing: false })

        } else {

          this.setData({ playing: true })

        }

      }

    })


    index.wxml


    <!--index.wxml-->

    <view class="container">

      <label>点击红色正方形(旋转/暂停)</label>

      <view class="kuang" style="animation-play-state:{{playing?'running':'paused'}} !important" bindtap="bingclick"></view>

    </view>


    index.wxss


    /**index.wxss**/

    @keyframes circle{0%{transform: rotate(0deg)}100%{ transform: rotate(360deg)}}

    .kuang{

      margin: 160rpx auto 0;

      position: relative;

      z-index: 10;

      width: 400rpx;

      height: 400rpx;

      -webkit-animation: circle 20s linear infinite;

      -moz-animation: circle 20s linear infinite;

      animation: circle 20s linear infinite;

      background-color: red;

    }


    2017-07-10
    有用
    回复
登录 后发表内容