最新版:调用rotateY时,transform-style样式无效
发布于 6 年前 作者 tsong 11186 次浏览 来自 问答

wxml:

         

         

js:

onTranslate: function (event, duration) {

   this.animation.rotateY(this.data.coverShow ? 180 : 0).step({duration: 500});

   this.setData({

       coverShow: !this.data.coverShow,

       translateAnimation: this.animation.export(),

   })

}

wxss:

.flip{

  transform-style: preserve-3d;

  -webkit-transform-style: preserve-3d;

  position: relative;

   …

}

.a{background-color:red;}

.b{background-color:blue;}

以上代码在IDE上调试表现正常,真机上出现错误,调用rotateY反转后仍然显示view a(正常情况下,应该显示view b)

回到顶部