Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/css/40.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Css 如何使用GSAP在对角轴上旋转正方形?_Css_Css Transforms_Gsap - Fatal编程技术网

Css 如何使用GSAP在对角轴上旋转正方形?

Css 如何使用GSAP在对角轴上旋转正方形?,css,css-transforms,gsap,Css,Css Transforms,Gsap,在CSS中进行对角线旋转非常容易 -webkit-transform: rotate3d(1,1,0,180deg) 但是,使用GSAP如何才能达到同样的效果呢?我从GSAP论坛获得了解决方案,其中包括游戏中的两个元素 TweenMax.set(".gsap",{rotation:45}); TweenMax.set(".container2",{rotation:-45}); TweenMax.to(".container2",1.5,{rotationY:180,repeat:-1});

在CSS中进行对角线旋转非常容易

-webkit-transform: rotate3d(1,1,0,180deg)


但是,使用GSAP如何才能达到同样的效果呢?

我从GSAP论坛获得了解决方案,其中包括游戏中的两个元素

TweenMax.set(".gsap",{rotation:45});
TweenMax.set(".container2",{rotation:-45});
TweenMax.to(".container2",1.5,{rotationY:180,repeat:-1});

尽管如此,我还是很想知道最好的可能性