transform and translate Transform refers to transformation and deformation. It is a CSS3 attribute, just like other width and height attributes. translate is the attribute value of transform, which means that the element is transformed in 2D. 2D transformation means that the element moves in the direction of the x-axis and in the direction of the y-axis from the current position (0,0). For example: transform: translate(0,100%) means moving the element downward along the y-axis from its current position by the entire height of the element. transform: translate(-20px,0) means moving 20px to the left along the x-axis from the current position of the element transform has many other property values, translate3D (3D transformation), scale (2D scaling) and other transformation methods. transition transition is the animation process of changing one set of CSS properties to another set of properties within a certain period of time. Can be used to achieve dynamic effects, css3 properties Syntax transition: The property to be transformed The time required to transform Control the speed of the animation Change The delay time after which the animation starts to execute The transition property is written in the initial style, not in the ending style, which is the style that defines the appearance of the element before the animation starts. You only need to set a transition on an element once, and the browser will take care of animating from one style to another. For example: transition:width 2s; transition:translate 2s; Transtion: all 2s. Summarize This concludes this article about the differences and functions of transition, transform, and translate in CSS3. For more relevant css3 transition, transform, and translate content, please search 123WORDPRESS.COM’s previous articles or continue to browse the following related articles. I hope that everyone will support 123WORDPRESS.COM in the future! |
<<: Conflict resolution when marquee and flash coexist in a page
>>: Vue implements small notepad function
Table of contents Preface 1. Application componen...
IDEA is the most commonly used development tool f...
1. Introduction Docker has an orchestration tool ...
About Event: MySQL 5.1 began to introduce the con...
MySQL Bin log data recovery: accidentally delete ...
Table of contents Technology Stack Effect analyze...
<br />This article will briefly introduce yo...
This article shares with you how to use bootstrap...
MySQL DATE_ADD(date,INTERVAL expr type) and ADDDA...
When changing the time zone under Linux, it is al...
1. Get the real path of the current script: #!/bi...
Preface "High Performance MySQL" mentio...
This article example shares the specific code of ...
Table of contents Advantage 1: Optimization of di...
1. Check the character set of the default install...