微信公开课
如何看待微信公开课小程序热门讨论「小程序CSS动画问题」
摘要:小程序CSS动画问题
展开:我想通过CSS的关键帧动画写一个扇形图转动的动画:使用的CSS代码如下:.pie{margintop:460rpx;width:160rpx;height:160rpx;borderradius:80rpx;background:d8eeff;backgroundimage:lineargradient(toright,transparent50%,22E2280);overflow:hidden;}.colormask{backgroundcolor:red;marginleft:50%;height:100%;overflow:hidden;transformorigin:left;animation:spin3slinearinfinite;}@keyframesspin{to{transform:rotate(.5turn);}}viewclasspieviewclasscolormask/!viewclasspiemask//view然后这段代码在模拟器上运行的很好。但是在IOS真机上,colormask的形状变的非常奇怪:如果不使用动画的话,就不会出现这些边角,请问这是什么原因呢了解更多