> The initial APIs of this component are supported since API version 7. Newly added APIs will be marked with a superscript to indicate their earliest API version.
| transform-origin | string<sup>6+</sup>\|\<percentage> \|\<length> string<sup>6+</sup>\|\<percentage> \|\<length> | center center | Origin position of the transformed element. The unit can be px or a percentage (relative to the animation target component). If only one value is specified, the other one is **50%**. The available values for the first string are **left**, **center**, and **right**. The available values for the second string are **top**, **center**, and **bottom**.<br>Example:<br/>transform-origin: 200px 30%<br/>transform-origin: 100px topt<br/>ransform-origin: center center |
| transform | string | - | Translation, rotation, and scaling attributes.<br/>For details, see **transform**. |
</th>
| animation<sup>6+</sup> | string | 0s ease 0s 1 normal none running none | Animation attributes in the format of **duration \| timing-function \| delay \| iteration-count \| direction \| fill-mode \| play-state \| name**. The order of the parameters is not specified, but the **duration** and **delay** parameters are parsed based on where they are placed. |
</tr>
| animation-name | string | - | @keyframes rule. For details, see **@keyframes**. |
</thead>
| animation-delay | \<time> | 0 | Delay for playing the animation, in ms or s, for example, **1000 ms** or **1s**. The default unit is ms. |
| animation-duration | \<time> | 0 | Animation duration, in ms or s, for example, **1000 ms** or **1s**. The default unit is ms.<br/>NOTE:<br/>**animation-duration** must be specified. Otherwise, the duration is **0**, which means the animation will not be played. |
</td>
| animation-iteration-count | number \| infinite | 1 | Number of times that an animation is played. The animation is played once by default. You can set the value to **infinite** to play the animation infinitely. |
| animation-timing-function | string | ease | Speed curve of an animation, which makes the animation more fluent.Available values are as follows: <br>- **linear**: The animation speed keeps unchanged. <br>- **ease**: The animation starts at a low speed and then accelerates. It slows down before the animation ends. **cubic-bezier(0.25, 0.1, 0.25, 1.0)**<br>- **ease-in**: The animation starts at a low speed. **cubic-bezier(0.42, 0.0, 1.0, 1.0)**<br>- **ease-out**: The animation ends at a low speed. **cubic-bezier(0.0, 0.0, 0.58, 1.0)**<br>- **ease-in-out**: The animation starts and ends at a low speed. **cubic-bezier(0.42, 0.0, 0.58, 1.0)****<br>- **friction**: Damping curve, **cubic-bezier(0.2, 0.0, 0.2, 1.0)****<br>- **extreme-deceleration**: Extreme deceleration curve, **cubic-bezier(0.0, 0.0, 0.0, 1.0) curve****<br>- **sharp**: Sharp curve, **cubic-bezier(0.33, 0.0, 0.67, 1.0)****<br>- **rhythm**: Rhythm curve, **cubic-bezier(0.7, 0.0, 0.2, 1.0)****<br>- **smooth**: Smooth curve, **cubic-bezier(0.4, 0.0, 0.4, 1.0)****<br>- **cubic-bezier**: You can customize an animation speed curve in the **cubic-bezier()** function. The x and y values of each input parameter must be between 0 and 1.<br>- steps: step curve <sup>6+</sup>. Syntax: steps(number[, end\|start]); The number parameter is mandatory. The value must be a positive integer. The second parameter is optional. It indicates that the start point or end point of each interval changes step by step. The value can be end or start. The default value is end. |
</td>
| animation-direction<sup>6+</sup> | string | normal | Mode of playing the animation. <br>- **normal**: Plays the animation in forward loop mode. <br>- **reverse**: Plays the animation in reverse loop mode. <br>- **alternate**: Plays the animation in alternating loop mode. When the animation is played for an odd number of times, the playback is in forward direction. When the animation is played for an even number of times, the playback is in backward direction. <br>- **alternate-reverse**: Plays the animation in reverse-alternating loop mode. When the animation is played for an odd number of times, the playback is in backward direction. When the animation is played for an even number of times, the playback is in forward direction. |
| animation-fill-mode | string | none | Start and end styles of the animation <br>- **none**: No style is applied to the target before or after the animation is executed. <br>- **forwards**: The target keeps the state at the end of the animation (defined in the last key frame) after the animation is executed. <br>- **backwards**<sup>6+</sup>: The animation uses the value defined in the first key frame during the **animation-delay**. When **animation-direction** is set to **normal** or **alternate**, the value in the **from** key frame is used. When **animation-direction** is set to **reverse** or **alternate-reverse**, the value in the **to** key frame is used.. <br>- **both**<sup>6+</sup>: The animation follows the **forwards** and **backwards** rules. |
</td>
| animation-play-state<sup>6+</sup> | string | running | Current state of the animation. <br>- **paused**: paused <br>- **running**: playing |
<tdclass="cellrowborder"valign="top"width="37%"headers="mcps1.1.5.1.4 "><pid="p6867140201912"><aname="p6867140201912"></a><aname="p6867140201912"></a>Origin position of the transformed element. The unit can be px or a percentage (relative to the animation target component). If only one value is specified, the other one is <strongid="b18297190153111"><aname="b18297190153111"></a><aname="b18297190153111"></a>50%</strong>. The available values for the first string are <strongid="b76212170322"><aname="b76212170322"></a><aname="b76212170322"></a>left</strong>, <strongid="b56420192323"><aname="b56420192323"></a><aname="b56420192323"></a>center</strong>, and <strongid="b641019164323"><aname="b641019164323"></a><aname="b641019164323"></a>right</strong>. The available values for the second string are <strongid="b11194144433213"><aname="b11194144433213"></a><aname="b11194144433213"></a>top</strong>, <strongid="b15762430323"><aname="b15762430323"></a><aname="b15762430323"></a>center</strong>, and <strongid="b7648942183213"><aname="b7648942183213"></a><aname="b7648942183213"></a>bottom</strong>.</p>
| transition<sup>6+</sup> | string | all 0 ease 0 | Transition effect when the component status is switched. The following four attributes can be set through the <br>- **transition** attribute: **transition-property**: name of the CSS property for setting the transition effect. Currently, the width, height, and background color are supported. <br>- **transition-duration**: duration required for completing the transition effect, in seconds. <br>- **transition-timing-function**: time curve of the transition effect. The curve provided by the style animation is supported. <br>- **transition-delay**: delay for starting the transition effect, in seconds. |
| translate | \<length> \|\<percent> | Moves an element along the x-axis and y-axis. |
</td>
| translate3d<sup>6+</sup> | \<length> \|\<percent> | Three input parameters, indicating the translation distance of the x-axis, y-axis, and z-axis, respectively. |
| rotate | \<deg> \|\<rad> \|\<grad><sup>6+</sup>\|\<turn><sup>6+</sup> | Rotates an element. You can set the element to rotate around its x-axis or y-axis. |
</td>
| rotate3d<sup>6+</sup> | \<deg> \|\<rad> \|\<grad> \|\<turn> | Four input parameters: The first three parameters are the rotation vectors of the x-axis, y-axis, and z-axis, and the fourth parameter is the rotation angle. |
<tdclass="cellrowborder"valign="top"width="16%"headers="mcps1.1.5.1.3 "><pid="p125157290172"><aname="p125157290172"></a><aname="p125157290172"></a>0s ease 0s 1 normal none running none</p>
| rotateX | \<deg> \|\<rad> \|\<grad><sup>6+</sup>\|\<turn><sup>6+</sup> | Rotates an element around the x-axis. |
</td>
| rotateY | \<deg> \|\<rad> \|\<grad><sup>6+</sup>\|\<turn><sup>6+</sup> | Rotates an element around the y-axis. |
<tdclass="cellrowborder"valign="top"width="37%"headers="mcps1.1.5.1.4 "><pid="p1515152915179"><aname="p1515152915179"></a><aname="p1515152915179"></a>Animation attributes in the format of <strongid="b277520213360"><aname="b277520213360"></a><aname="b277520213360"></a>duration | timing-function | delay | iteration-count | direction | fill-mode | play-state | name</strong>. The order of the parameters is not specified, but the <strongid="b41781226144019"><aname="b41781226144019"></a><aname="b41781226144019"></a>duration</strong> and <strongid="b97790287409"><aname="b97790287409"></a><aname="b97790287409"></a>delay</strong> parameters are parsed based on where they are placed.</p>
| rotateZ<sup>6+</sup> | \<deg> \|\<rad> \|\<grad> \|\<turn> | Rotation angle in the z-axis direction. |
</td>
| skew<sup>6+</sup> | \<deg> \|\<rad> \|\<grad> \|\<turn> | Two input parameters, indicating the 2D skew angle of the x-axis and y-axis, respectively. |
</tr>
| skewX<sup>6+</sup> | \<deg> \|\<rad> \|\<grad> \|\<turn> | 2D skew angle of the x-axis. |
| background-color | \<color> | - | Background color applied to the component after the animation is played. |
</tr>
| opacity | number | 1 | Opacity value applied to the component after the animation is played. The value ranges from **0** to **1**. The default value is **1**. |
| transform | string | - | Transformation type applied to a component. For details, see **transform**. |
</td>
| background-position<sup>6+</sup> | string \|\<percentage> \|\<length> string \|\<percentage> \|\<length> | 50% 50% | Set the background image for a window. The unit can be percentage or px. The first value indicates the horizontal position, and the second value indicates the vertical position. If only one value is specified, the other one is **50%**. The available values for the first string are **left**, **center**, and **right**. The available values for the second string are **top**, **center**, and **bottom**.<br>Example:<br>- background-position: 200px 30%<br>- background-position: 100px top<br>- background-position: center center |
If there is no default value for when an animation will start or end, use **from** and **to** to specify the start and end of the display. You can use a percentage value to specify an intermediate state of the animation.<sup>6+</sup> The following is an example:
<tdclass="cellrowborder"valign="top"width="37%"headers="mcps1.1.5.1.4 "><pid="p1864135310710"><aname="p1864135310710"></a><aname="p1864135310710"></a>Delay for playing the animation, in ms or s, for example, <strongid="b293531415419"><aname="b293531415419"></a><aname="b293531415419"></a>1000 ms</strong> or <strongid="b583541616540"><aname="b583541616540"></a><aname="b583541616540"></a>1s</strong>. The default unit is ms.</p>
<tdclass="cellrowborder"valign="top"width="37%"headers="mcps1.1.5.1.4 "><pid="p342192073412"><aname="p342192073412"></a><aname="p342192073412"></a>Animation duration, in ms or s, for example, <strongid="b12381105114557"><aname="b12381105114557"></a><aname="b12381105114557"></a>1000 ms</strong> or <strongid="b19208554135519"><aname="b19208554135519"></a><aname="b19208554135519"></a>1s</strong>. The default unit is ms.</p>
<divclass="note"id="note11257121119511"><aname="note11257121119511"></a><aname="note11257121119511"></a><spanclass="notetitle"> NOTE: </span><divclass="notebody"><pid="p126422011184410"><aname="p126422011184410"></a><aname="p126422011184410"></a><strongid="b926872271012"><aname="b926872271012"></a><aname="b926872271012"></a>animation-duration</strong> must be specified. Otherwise, the duration is <strongid="b0902710165718"><aname="b0902710165718"></a><aname="b0902710165718"></a>0</strong>, which means the animation will not be played.</p>
<tdclass="cellrowborder"valign="top"width="37%"headers="mcps1.1.5.1.4 "><pid="p138641653475"><aname="p138641653475"></a><aname="p138641653475"></a>Number of times that an animation is played. The animation is played once by default. You can set the value to <strongid="b1292791613197"><aname="b1292791613197"></a><aname="b1292791613197"></a>infinite</strong> to play the animation infinitely.</p>
<tdclass="cellrowborder"valign="top"width="37%"headers="mcps1.1.5.1.4 "><pid="p38652531974"><aname="p38652531974"></a><aname="p38652531974"></a>Speed curve of an animation, which makes the animation more fluent.</p>
<pid="p586513531377"><aname="p586513531377"></a><aname="p586513531377"></a>Available values are as follows:</p>
<aname="ul104958313219"></a><aname="ul104958313219"></a><ulid="ul104958313219"><li><strongid="b18699201511716"><aname="b18699201511716"></a><aname="b18699201511716"></a>linear</strong>: The animation speed keeps unchanged.</li><li><strongid="b144551743373"><aname="b144551743373"></a><aname="b144551743373"></a>ease</strong>: The animation starts at a low speed and then accelerates. It slows down before the animation ends. <strongid="b55701863912"><aname="b55701863912"></a><aname="b55701863912"></a>cubic-bezier(0.25, 0.1, 0.25, 1.0)</strong></li><li><strongid="b115717510818"><aname="b115717510818"></a><aname="b115717510818"></a>ease-in</strong>: The animation starts at a low speed. <strongid="b161691025131118"><aname="b161691025131118"></a><aname="b161691025131118"></a>cubic-bezier(0.42, 0.0, 1.0, 1.0)</strong></li><li><strongid="b1069413125146"><aname="b1069413125146"></a><aname="b1069413125146"></a>ease-out</strong>: The animation ends at a low speed. <strongid="b18657220191111"><aname="b18657220191111"></a><aname="b18657220191111"></a>cubic-bezier(0.0, 0.0, 0.58, 1.0)</strong></li><li><strongid="b1540172812147"><aname="b1540172812147"></a><aname="b1540172812147"></a>ease-in-out</strong>: The animation starts and ends at a low speed. <strongid="b13968449121017"><aname="b13968449121017"></a><aname="b13968449121017"></a>cubic-bezier(0.42, 0.0, 0.58, 1.0)</strong></li><li><strongid="b752771711716"><aname="b752771711716"></a><aname="b752771711716"></a>friction</strong>: Damping curve, <strongid="b1142194217138"><aname="b1142194217138"></a><aname="b1142194217138"></a>cubic-bezier(0.2, 0.0, 0.2, 1.0)</strong></li><li><strongid="b19750154161716"><aname="b19750154161716"></a><aname="b19750154161716"></a>extreme-deceleration</strong>: Extreme deceleration curve, <strongid="b5678937171412"><aname="b5678937171412"></a><aname="b5678937171412"></a>cubic-bezier(0.0, 0.0, 0.0, 1.0) curve</strong></li><li><strongid="b1555123841813"><aname="b1555123841813"></a><aname="b1555123841813"></a>sharp</strong>: Sharp curve, <strongid="b667512256157"><aname="b667512256157"></a><aname="b667512256157"></a>cubic-bezier(0.33, 0.0, 0.67, 1.0)</strong></li><li><strongid="b655994931814"><aname="b655994931814"></a><aname="b655994931814"></a>rhythm</strong>: Rhythm curve, <strongid="b4933030141514"><aname="b4933030141514"></a><aname="b4933030141514"></a>cubic-bezier(0.7, 0.0, 0.2, 1.0)</strong></li><li><strongid="b13383205711181"><aname="b13383205711181"></a><aname="b13383205711181"></a>smooth</strong>: Smooth curve, <strongid="b223183816152"><aname="b223183816152"></a><aname="b223183816152"></a>cubic-bezier(0.4, 0.0, 0.4, 1.0)</strong></li><li><strongid="b787022161914"><aname="b787022161914"></a><aname="b787022161914"></a>cubic-bezier</strong>: You can customize an animation speed curve in the <strongid="b2993184561819"><aname="b2993184561819"></a><aname="b2993184561819"></a>cubic-bezier()</strong> function. The x and y values of each input parameter must be between 0 and 1. </li><li>steps: step curve <supid="sup757555611248"><aname="sup757555611248"></a><aname="sup757555611248"></a>6+</sup>. Syntax: steps(number[, end|start]); The number parameter is mandatory. The value must be a positive integer. The second parameter is optional. It indicates that the start point or end point of each interval changes step by step. The value can be end or start. The default value is end.</li></ul>
<tdclass="cellrowborder"valign="top"width="37%"headers="mcps1.1.5.1.4 "><pid="p5611151219588"><aname="p5611151219588"></a><aname="p5611151219588"></a>Mode of playing the animation.</p>
<aname="ul7721141717012"></a><aname="ul7721141717012"></a><ulid="ul7721141717012"><li><strongid="b1422164554111"><aname="b1422164554111"></a><aname="b1422164554111"></a>normal</strong>: Plays the animation in forward loop mode.</li><li><strongid="b1428234804114"><aname="b1428234804114"></a><aname="b1428234804114"></a>reverse</strong>: Plays the animation in reverse loop mode.</li><li><strongid="b17968124924117"><aname="b17968124924117"></a><aname="b17968124924117"></a>alternate</strong>: Plays the animation in alternating loop mode. When the animation is played for an odd number of times, the playback is in forward direction. When the animation is played for an even number of times, the playback is in backward direction.</li><li><strongid="b14529185618411"><aname="b14529185618411"></a><aname="b14529185618411"></a>alternate-reverse</strong>: Plays the animation in reverse-alternating loop mode. When the animation is played for an odd number of times, the playback is in backward direction. When the animation is played for an even number of times, the playback is in forward direction.</li></ul>
<tdclass="cellrowborder"valign="top"width="37%"headers="mcps1.1.5.1.4 "><pid="p48661353174"><aname="p48661353174"></a><aname="p48661353174"></a>Start and end styles of the animation</p>
<aname="ul6388194816"></a><aname="ul6388194816"></a><ulid="ul6388194816"><li><strongid="b14268971763"><aname="b14268971763"></a><aname="b14268971763"></a>none</strong>: No style is applied to the target before or after the animation is executed.</li><li><strongid="b103612812616"><aname="b103612812616"></a><aname="b103612812616"></a>forwards</strong>: The target keeps the state at the end of the animation (defined in the last key frame) after the animation is executed.</li><li><strongid="b1317920599414"><aname="b1317920599414"></a><aname="b1317920599414"></a>backwards</strong><supid="sup1418295917413"><aname="sup1418295917413"></a><aname="sup1418295917413"></a>6+</sup>: The animation uses the value defined in the first key frame during the <strongid="b10185155914111"><aname="b10185155914111"></a><aname="b10185155914111"></a>animation-delay</strong>. When <strongid="b01276510428"><aname="b01276510428"></a><aname="b01276510428"></a>animation-direction</strong> is set to <strongid="b51365584211"><aname="b51365584211"></a><aname="b51365584211"></a>normal</strong> or <strongid="b51417564214"><aname="b51417564214"></a><aname="b51417564214"></a>alternate</strong>, the value in the <strongid="b7144751425"><aname="b7144751425"></a><aname="b7144751425"></a>from</strong> key frame is used. When <strongid="b914716516425"><aname="b914716516425"></a><aname="b914716516425"></a>animation-direction</strong> is set to <strongid="b1815118564213"><aname="b1815118564213"></a><aname="b1815118564213"></a>reverse</strong> or <strongid="b8154115194213"><aname="b8154115194213"></a><aname="b8154115194213"></a>alternate-reverse</strong>, the value in the <strongid="b1615895114213"><aname="b1615895114213"></a><aname="b1615895114213"></a>to</strong> key frame is used..</li><li><strongid="b178594774211"><aname="b178594774211"></a><aname="b178594774211"></a>both</strong><supid="sup1986387164219"><aname="sup1986387164219"></a><aname="sup1986387164219"></a>6+</sup>: The animation follows the <strongid="b186712710421"><aname="b186712710421"></a><aname="b186712710421"></a>forwards</strong> and <strongid="b198704712427"><aname="b198704712427"></a><aname="b198704712427"></a>backwards</strong> rules.</li></ul>
<tdclass="cellrowborder"valign="top"width="37%"headers="mcps1.1.5.1.4 "><pid="p173951158217"><aname="p173951158217"></a><aname="p173951158217"></a>Current state of the animation.</p>
<tdclass="cellrowborder"valign="top"width="37%"headers="mcps1.1.5.1.4 "><pid="p11717160134515"><aname="p11717160134515"></a><aname="p11717160134515"></a>Transition effect when the component status is switched. The following four attributes can be set through the <strongid="b748822284311"><aname="b748822284311"></a><aname="b748822284311"></a>transition</strong> attribute:</p>
<aname="ul17509159164618"></a><aname="ul17509159164618"></a><ulid="ul17509159164618"><li><strongid="b191110295432"><aname="b191110295432"></a><aname="b191110295432"></a>transition-property</strong>: name of the CSS property for setting the transition effect. Currently, the width, height, and background color are supported.</li><li><strongid="b75073523433"><aname="b75073523433"></a><aname="b75073523433"></a>transition-duration</strong>: duration required for completing the transition effect, in seconds.</li><li><strongid="b79011164411"><aname="b79011164411"></a><aname="b79011164411"></a>transition-timing-function</strong>: time curve of the transition effect. The curve provided by the style animation is supported.</li><li><strongid="b04480263441"><aname="b04480263441"></a><aname="b04480263441"></a>transition-delay</strong>: delay for starting the transition effect, in seconds.</li></ul>
</td>
</tr>
</tbody>
</table>
**Table 1** Methods of the **transform** attribute
<tdclass="cellrowborder"valign="top"width="54.25%"headers="mcps1.2.4.1.3 "><pid="p1389911421925"><aname="p1389911421925"></a><aname="p1389911421925"></a>No conversion is performed.</p>
<tdclass="cellrowborder"valign="top"width="54.25%"headers="mcps1.2.4.1.3 "><pid="p1067774812320"><aname="p1067774812320"></a><aname="p1067774812320"></a>A matrix of six values, which represent scaleX, skewY, skewX, scaleY, translateX, translateY.</p>
<tdclass="cellrowborder"valign="top"width="54.25%"headers="mcps1.2.4.1.3 "><pid="p98811441934"><aname="p98811441934"></a><aname="p98811441934"></a>Moves an element along the x-axis and y-axis.</p>
<tdclass="cellrowborder"valign="top"width="54.25%"headers="mcps1.2.4.1.3 "><pid="p75871991872"><aname="p75871991872"></a><aname="p75871991872"></a>Three input parameters, indicating the translation distance of the x-axis, y-axis, and z-axis, respectively.</p>
<tdclass="cellrowborder"valign="top"width="54.25%"headers="mcps1.2.4.1.3 "><pid="p688112441132"><aname="p688112441132"></a><aname="p688112441132"></a>Moves an element along the x-axis.</p>
<tdclass="cellrowborder"valign="top"width="54.25%"headers="mcps1.2.4.1.3 "><pid="p38818447314"><aname="p38818447314"></a><aname="p38818447314"></a>Moves an element along the y-axis.</p>
<tdclass="cellrowborder"valign="top"width="54.25%"headers="mcps1.2.4.1.3 "><pid="p1984090492"><aname="p1984090492"></a><aname="p1984090492"></a>Translation distance of the z-axis</p>
<tdclass="cellrowborder"valign="top"width="54.25%"headers="mcps1.2.4.1.3 "><pid="p5881114412312"><aname="p5881114412312"></a><aname="p5881114412312"></a>Changes the size of an element. You need to set the target width and height on the x-axis and y-axis.</p>
<tdclass="cellrowborder"valign="top"width="54.25%"headers="mcps1.2.4.1.3 "><pid="p1089317401198"><aname="p1089317401198"></a><aname="p1089317401198"></a>Three input parameters, indicating the scale ratio of the x-axis, y-axis, and z-axis, respectively.</p>
<tdclass="cellrowborder"valign="top"width="54.25%"headers="mcps1.2.4.1.3 "><pid="p388112446310"><aname="p388112446310"></a><aname="p388112446310"></a>Changes the element width.</p>
<tdclass="cellrowborder"valign="top"width="54.25%"headers="mcps1.2.4.1.3 "><pid="p128815441936"><aname="p128815441936"></a><aname="p128815441936"></a>Changes the element height.</p>
<tdclass="cellrowborder"valign="top"width="54.25%"headers="mcps1.2.4.1.3 "><pid="p3227142611100"><aname="p3227142611100"></a><aname="p3227142611100"></a>Scale ratio of the z-axis.</p>
<tdclass="cellrowborder"valign="top"width="54.25%"headers="mcps1.2.4.1.3 "><pid="p8882194415317"><aname="p8882194415317"></a><aname="p8882194415317"></a>Rotates an element. <spanid="ph146515256413"><aname="ph146515256413"></a><aname="ph146515256413"></a>You can set the element to rotate around its x-axis or y-axis.</span></p>
<tdclass="cellrowborder"valign="top"width="54.25%"headers="mcps1.2.4.1.3 "><pid="p927318720114"><aname="p927318720114"></a><aname="p927318720114"></a>Four input parameters: The first three parameters are the rotation vectors of the x-axis, y-axis, and z-axis, and the fourth parameter is the rotation angle.</p>
<tdclass="cellrowborder"valign="top"width="54.25%"headers="mcps1.2.4.1.3 "><pid="p588217441134"><aname="p588217441134"></a><aname="p588217441134"></a>Rotates an element around the x-axis.</p>
<tdclass="cellrowborder"valign="top"width="54.25%"headers="mcps1.2.4.1.3 "><pid="p8882544638"><aname="p8882544638"></a><aname="p8882544638"></a>Rotates an element around the y-axis.</p>
<tdclass="cellrowborder"valign="top"width="54.25%"headers="mcps1.2.4.1.3 "><pid="p956014135155"><aname="p956014135155"></a><aname="p956014135155"></a>Rotation angle in the z-axis direction.</p>
<tdclass="cellrowborder"valign="top"width="54.25%"headers="mcps1.2.4.1.3 "><pid="p2360558151514"><aname="p2360558151514"></a><aname="p2360558151514"></a>Two input parameters, indicating the 2D skew angle of the x-axis and y-axis, respectively.</p>
<tdclass="cellrowborder"valign="top"width="54.25%"headers="mcps1.2.4.1.3 "><pid="p019510511168"><aname="p019510511168"></a><aname="p019510511168"></a>2D skew angle of the x-axis.</p>
<tdclass="cellrowborder"valign="top"width="54.25%"headers="mcps1.2.4.1.3 "><pid="p1139013100165"><aname="p1139013100165"></a><aname="p1139013100165"></a>2D skew angle of the y-axis.</p>
<tdclass="cellrowborder"valign="top"width="54.25%"headers="mcps1.2.4.1.3 "><pid="p818755519156"><aname="p818755519156"></a><aname="p818755519156"></a>Distance from the lens to the element's surface in the 3D perspective scenario.</p>
</td>
</tr>
</tbody>
</table>
**Table 2** Attributes available for the @keyframes rule
<tdclass="cellrowborder"valign="top"width="46.464646464646464%"headers="mcps1.2.5.1.4 "><pid="a2a9535e7a520474eaa5ca78ca61ca148"><aname="a2a9535e7a520474eaa5ca78ca61ca148"></a><aname="a2a9535e7a520474eaa5ca78ca61ca148"></a>Background color applied to the component after the animation is played.</p>
<tdclass="cellrowborder"valign="top"width="46.464646464646464%"headers="mcps1.2.5.1.4 "><pid="a6bcdedbaaa87470cae3e3beea1b67aad"><aname="a6bcdedbaaa87470cae3e3beea1b67aad"></a><aname="a6bcdedbaaa87470cae3e3beea1b67aad"></a>Opacity value applied to the component after the animation is played. The value ranges from <strongid="b1144151018012"><aname="b1144151018012"></a><aname="b1144151018012"></a>0</strong> to <strongid="b291916111108"><aname="b291916111108"></a><aname="b291916111108"></a>1</strong>. The default value is <strongid="b52858406505"><aname="b52858406505"></a><aname="b52858406505"></a>1</strong>.</p>
<tdclass="cellrowborder"valign="top"width="46.464646464646464%"headers="mcps1.2.5.1.4 "><pid="p562617236301"><aname="p562617236301"></a><aname="p562617236301"></a>Width value applied to the component after the animation is played.</p>
<tdclass="cellrowborder"valign="top"width="46.464646464646464%"headers="mcps1.2.5.1.4 "><pid="a0ecbff2f02ac42ffb797b9bcae919003"><aname="a0ecbff2f02ac42ffb797b9bcae919003"></a><aname="a0ecbff2f02ac42ffb797b9bcae919003"></a>Height value applied to the component after the animation is played.</p>
<tdclass="cellrowborder"valign="top"width="46.464646464646464%"headers="mcps1.2.5.1.4 "><pid="adff3debf36764e5c868ca9823663cd5b"><aname="adff3debf36764e5c868ca9823663cd5b"></a><aname="adff3debf36764e5c868ca9823663cd5b"></a>Transformation type applied to a component. For details, see <ahref="#table28802443315">Table 1</a>.</p>
<tdclass="cellrowborder"valign="top"width="46.464646464646464%"headers="mcps1.2.5.1.4 "><pid="p14867144143014"><aname="p14867144143014"></a><aname="p14867144143014"></a>Set the background image for a window. The unit can be percentage or px. The first value indicates the horizontal position, and the second value indicates the vertical position. If only one value is specified, the other one is <strongid="b726314471500"><aname="b726314471500"></a><aname="b726314471500"></a>50%</strong>. The available values for the first string are <strongid="b13819621155112"><aname="b13819621155112"></a><aname="b13819621155112"></a>left</strong>, <strongid="b188192021185113"><aname="b188192021185113"></a><aname="b188192021185113"></a>center</strong>, and <strongid="b14819132110512"><aname="b14819132110512"></a><aname="b14819132110512"></a>right</strong>. The available values for the second string are <strongid="b18203211511"><aname="b18203211511"></a><aname="b18203211511"></a>top</strong>, <strongid="b1182002113513"><aname="b1182002113513"></a><aname="b1182002113513"></a>center</strong>, and <strongid="b1882072165113"><aname="b1882072165113"></a><aname="b1882072165113"></a>bottom</strong>.</p>
<aname="ul19908143113422"></a><aname="ul19908143113422"></a><ulid="ul19908143113422"><li>background-position: 200px 30%</li><li>background-position: 100px top</li><li>background-position: center center</li></ul>
</td>
</tr>
</tbody>
</table>
If there is no default value for when an animation will start or end, use **from** and **to** to specify the start and end of the display. You can use a percentage value to specify an intermediate state of the animation.<sup>6+</sup> The following is an example:
```
<divclass="container">
<divclass="container">
<divclass="rect">
<divclass="rect">
</div>
</div>
</div>
</div>
```
```
```
```css
/* xxx.css */
.container{
.container{
display:flex;
display:flex;
justify-content:center;
justify-content:center;
align-items:center;
align-items:center;
margin:150px;
}
}
.rect{
.rect{
width:200px;
width:200px;
...
@@ -404,7 +89,7 @@ If there is no default value for when an animation will start or end, use **fro
...
@@ -404,7 +89,7 @@ If there is no default value for when an animation will start or end, use **fro
background-color:#f76160;
background-color:#f76160;
transform:translate(100px)rotate(0deg)scale(1.0);
transform:translate(100px)rotate(0deg)scale(1.0);
}
}
/* Specify the intermediate state of the animation by a percentage value.6+ */
/* Specify the intermediate state of the animation by a percentage value.<sup>6+</sup> */