.spinner{/*color*/background-color:#3e4b54;/*layout*/width:150px;height:150px;animation:rotateplane5sease-in-out;-webkit-animation:rotateplane5sease-in-out;}}@keyframesrotateplane{0%{transform:perspective(120px);}50%{transform:perspective(120px)rotateY(180deg);}100%{transform:perspective(120px)rotateX(180deg)rotateY(180deg);}}這段代碼可以創(chuàng)建一個旋轉方塊,順著Y軸轉180,然后順著x軸轉180,但是當我把100%時候的rotateY(180deg)刪除之后,感覺就是2d旋轉了,這是什么原因?
css3 創(chuàng)建旋轉方塊
三國紛爭
2019-04-19 16:29:40