CSS3 Multiple transforms

前端 未结 2 1437
栀梦
栀梦 2021-01-19 14:45

I have a css3 animation, im using the code below to rotate a cube on the X-axis.

@-webkit-keyframes spin2 {
from { -webkit-transform: rotateX(135deg); }
to           


        
2条回答
  •  感动是毒
    2021-01-19 15:26

    You can use several transform functions in the transform property by separating them with a space:

    @-webkit-keyframes spin2 {
        from {
            -webkit-transform: rotateX(135deg) rotateY(135deg);
        }
        to   {
            -webkit-transform: rotateX(855deg) rotateY(855deg);
        }
    }
    

提交回复
热议问题