Units for CSS Transition Duration

Is s for seconds the only element that I can use for time values ​​in a transition or CSS animation. It is impossible to find anything about this in the specifications.

+6
source share
2 answers

You can use s (seconds) and ms (milliseconds)

transition duration property

Syntax

Transition Duration: [,] * Property Values

One or more transition periods, separated by commas.

time

 Floating-point number, followed by a time units designator (ms or s). 

Reference to values ​​and units.

+8
source

you can use ms milliseconds also

Definition and use

The duration-duration property indicates how many seconds (s) or milliseconds (ms) the transition effect ends.

Look at w3schools

+1
source

Source: https://habr.com/ru/post/923114/


All Articles