tweenmax can change css3 properties. The built-in CSSPlugin in tweenmax can be used to create CSS animations. By setting the animation parameters, you can change the CSS properties. The syntax is "TweenMax.to (specify the object of animation, animation duration, {css property for animation change});".
The operating environment of this tutorial: Windows 10 system, CSS3&&HTML5 version, Dell G3 computer.
Can tweenmax change css3 properties
TweenMax’s built-in CSSPlugin can create CSS animations and change CSS properties,
Including simple methods of 2d transform and 3d transform, such as x:
Move horizontally, equivalent to CSS3's translateX.
rotation: rotation, equivalent to rotate.
skewX: oblique cut, equivalent to skew.
There are many more. You can also directly set CSS3 properties for animation without using simple methods, for example:
TweenMax.to(element, 3, {transform:’rotate(30deg)’})
TweenMax.to("#obj", 3, {x:200});//在原有位置向右移动200px TweenMax.to("#obj", 3, {x:200, y:100});//向右移动200px的同时向下移动100px
css video tutorial)
The above is the detailed content of Can tweenmax change css3 properties?. For more information, please follow other related articles on the PHP Chinese website!