First, deformation
Transform: The element object can be rotated rotate, scaled scale, moved translate, tilted skew, matrix deformed.
Example:
Transform:rotate (90deg) scale (1.5,0.8) translate (100px,50px) skew (45deg,45deg);
/* Matrix WARP */
Matrix (<number>,<number>,<number>,<number>,<number>,<number>);
/* Perspective */
Perspective (length);
Transition: Excessive attributes
Transition: Excessive effect of CSS property name over effect when long speed effect of speed curve over effect start time;
Transition:property duration timing-function delay;
/* Example */
Transition:1s ease all;
-webkit-tansition:1s ease all;
-moz-transition:1s ease all;
-o-transition:1s ease all;
Rotate (): a two-dimensional space rotation element.
If the element sets the perspective value, the Rotate3d () can be used to achieve a three-dimensional internal rotation.
Rotatex (Angele)/* equivalent to Rotate3d (1,0,0,angle) specifies x-axis rotation in three-dimensional space */
Rotatey (Angele)/* equivalent to Rotate3d (0,1,0,angle) specifies the y-axis rotation in three-dimensional space */
Rotatez (Angele)/* equivalent to Rotate3d (0,0,1,angle) specifies the z-axis rotation in three-dimensional space */
Scale ()
ScaleX (<number>)/* Scales the element only on the x-axis (horizontal) */
ScaleY (<number>)/* Zoom only on the y-axis (vertical) */
Scalez (<number>)/* only in Z-axis scaling, if: element setting pivot Value */
Translate ([,]): Move, is the amount of displacement.
TranslateX (<translation-value>);/* Move only on the x-axis (horizontal) */
Translatey (<translation-value>);/* Move only in the y-axis (vertical direction) */
Translatez (<translation-value>);/* Only moves on the z axis, provided that the element sets the pivot value */
Skew (): Tilt
Skewx (<angle>);/* Tilt only at x-axis (horizontal) */
Skewy (<angle>);/* tilt only on y-axis (vertical) */
Matrix (a,c,e,b,d,f): matrices deform, the values of C, e are represented by a sine or cosine value.
A: denotes ScaleX (); X-Axis Scaling
C:skewy (); Y-axis Tilt
E:skewx (); X-axis Tilt
B:scaley (); Y-Axis Scaling
D:translatex () x-axis movement
F:translatey () y-axis movement
Transform:matrix (<number>,<number>,<number>,<number>,<number>,<number>);
Perspective (): Perspective
. wrap{
}
. Wrap. child{
Transform:perspective (1000px);
}
Ii. transition
Transition-property: Excessive attributes
transition-property:all;/* is overly effective for all elements */
transition-property:none;/* no element has excessive effect */
transition-property:ident;/* specifies that the CSS properties are overly effective, such as width*/
Transition-duration: Excessive time
Transition-delay: When the delay time is negative, the over action is displayed from that point in time and the previous action is truncated.
Transition-timing-function: Over effect, default ease.
transition-timing-function:ease;/* mitigation effect, equivalent to Cubic-bezier (0.25,0.1,0.25,1.0) function, cubic Bezier */
transition-timing-function:linear;/* linear effect, equivalent to Cubic-bezier (0.0,0.0,1.0,1.0) function */
transition-timing-function:ease-in;/* fade effect, equivalent to Cubic-bezier (0.42,0,1.0,1.0) function */
transition-timing-function:ease-out;/* fade effect, equivalent to Cubic-bezier (0,0,0.58,1.0) function */
transition-timing-function:ease-in-out;/* fade fade effect, equivalent to Cubic-bezier (0.42,0,0.58,1.0) function */
transition-timing-function:cubic-bezier;/* special cubic Bezier curve effect */
Third, animation
Animation-name: The animated name, which must be used in conjunction with the rule @keyframes, because the animation name is defined by @keyframes, if multiple attribute values are provided separated by commas.
@keyframes is equivalent to a namespace, followed by a noun, if the animation-name in class defines the corresponding name to perform the animation. When defining animations, you can use the keyword from and to directly, from one state to another.
. animation_name{
left:0;
top:100px;
Position:absolute;
-webkit-animation:0.5s 0.5s ease infinite alternate;
-moz-animation:0.5s 0.5s ease infinite alternate;
-webkit-animation-name:demo;
-moz-animation-name:demo;
}
@-webkit-keyframes demo{
from{left:0;}
to{left:400px;}
}
@-webkit-keyframes demo1{
0%{left:0;}
50%{left:200px;}
100%{left:400px;}
}
Animation-duration: Animation time
Animation-timing-function: Playback method, the value is as follows:
Ease: mitigation effect, equivalent to Cubic-bezier (0.25,0.1,0.25,1.0) function, both cubic Bezier.
Linear: Linear effect
Ease-in: Fade effect
Ease-out: Fade effect
Ease-in-out: Fade Fade effect
Step-start: Jumps immediately to the end of the animation state
Step-end: Keep the animation start state, to the end of the animation execution time, jump to the end of the animation immediately
Step ([, [Start | end]]?) : The first parameter number is the specified interval, that is, the animation is divided into N-step stage display, the second parameter defaults to end, set the last step state, start is the state at the end, end is the state at the beginning, if the setting and Animation-fill-mode effect conflict, The end state of the animation is set to Animation-fill-mode.
Cubic-bezier (,,,): Special cubic bell curve effect
Animation-delay: Start playback time
Animation-iteration-count: Play count, infinite when value is infinite loop playback
Animation-direction: Playback direction, value is:
Normal: Regular direction
Reverse: The animation runs in reverse, always in the same direction as normal
Alternate: Animation will cycle forward and reverse motion
Animation-fill-mode: Post-play status, value:
None: Default value, not set
Forwards: The state at which the animation ends after it finishes
Backwards: Returns the start state of the animation after the end
Both: After the end can follow the forwards and backwards two rules
Animation-play-state: Retrieves or sets the state of an object's animation, taking a value:
Running: Default, Motion
Paused: Pause
Iv. Association Properties
Transform-origin: The origin of the transformation, the reference point of the transform, which defaults to the center point of the element. There are two parameters, parameter one is the horizontal axis, parameter two is the ordinate.
Percentage: Specifies the coordinate value in percent, which can be negative
Length: Specifies the coordinate value with the lengths, which can be negative
Left center right: horizontal direction value
Top Center Bottom: Vertical direction values
Perspective-prigin: The pivot origin, which defines the 3D element on the x-axis and the y-axis, allows to change the bottom position of the 3D element, when the attribute is defined, it is a child element of an element, a perspective, not the element itself.
Note: Using this property must be used in conjunction with the perspective property to affect only the elements of the 3D transformation.
Value: Percentage, length, left, center, right, top, center, bottom
Backface-visibility: Hide the back of the content, the back is visible by default, the content of the inverted transform is still visible, and when Backface-visibility is set hidden, the content is hidden after rotation and the front face is no longer visible after rotation.
Value: Visible, hidden
Transform-style:3d rendering, set the embedded elements in 3D space how to render, there are two values:
Flat: All child elements are rendered in 2D plane
Preserve-3d: Preserve 3D space