问题:
微信里播放动画 no-repeat 好像没效果?
在PC的浏览器正常,放到微信里就出问题。
CSS动画是这样写的:
@keyframes dice1
{
0% {background: url(../images/dice1.png) no-repeat center; background-size: contain; }
20% {background: url(../images/dice5.png) no-repeat center; background-size: contain; }
40% {background: url(../images/dice3.png) no-repeat center; background-size: contain; }
60% {background: url(../images/dice6.png) no-repeat center; background-size: contain; }
80% {background: url(../images/dice2.png) no-repeat center; background-size: contain; }
100% {background: url(../images/dice4.png) no-repeat center; background-size: contain; }
}
@keyframes dice2
{
0% {background: url(../images/dice5.png) no-repeat center; background-size: contain; }
20% {background: url(../images/dice2.png) no-repeat center; background-size: contain; }
40% {background: url(../images/dice3.png) no-repeat center; background-size: contain; }
60% {background: url(../images/dice6.png) no-repeat center; background-size: contain; }
80% {background: url(../images/dice4.png) no-repeat center; background-size: contain; }
100% {background: url(../images/dice1.png) no-repeat center; background-size: contain; }
}
@-webkit-keyframes dice1
{
0% {background: url(../images/dice1.png) no-repeat center; background-size: contain; }
20% {background: url(../images/dice5.png) no-repeat center; background-size: contain; }
40% {background: url(../images/dice3.png) no-repeat center; background-size: contain; }
60% {background: url(../images/dice6.png) no-repeat center; background-size: contain; }
80% {background: url(../images/dice2.png) no-repeat center; background-size: contain; }
100% {background: url(../images/dice4.png) no-repeat center; background-size: contain; }
}
@-webkit-keyframes dice2
{
0% {background: url(../images/dice5.png) no-repeat center; background-size: contain; }
20% {background: url(../images/dice2.png) no-repeat center; background-size: contain; }
40% {background: url(../images/dice3.png) no-repeat center; background-size: contain; }
60% {background: url(../images/dice6.png) no-repeat center; background-size: contain; }
80% {background: url(../images/dice4.png) no-repeat center; background-size: contain; }
100% {background: url(../images/dice1.png) no-repeat center; background-size: contain; }
}
引用动画
.ani1 { -webkit-animation: dice1 .5s step-start infinite; animation: dice1 .5s step-start infinite; }
.ani2 { -webkit-animation: dice2 .5s step-start infinite; animation: dice2 .5s step-start infinite; }
谢谢邀请。二维码扫描一片空白啊!