Home  >  Article  >  Web Front-end  >  Can tweenmax change css3 properties?

Can tweenmax change css3 properties?

WBOY
WBOYOriginal
2022-04-28 14:27:461628browse

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});".

Can tweenmax change css3 properties?

The operating environment of this tutorial: Windows 10 system, CSS3&&HTML5 version, Dell G3 computer.

Can tweenmax change css3 properties

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)’})

Can tweenmax change css3 properties?

##left property animation requires position:reletive support. If you need relative position movement, you can use x (CSS3 2D animation) is easier


TweenMax.to("#obj", 3, {x:200});//在原有位置向右移动200px
TweenMax.to("#obj", 3, {x:200, y:100});//向右移动200px的同时向下移动100px

(Learning video sharing:

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!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn