transition-duration

Свойство transition-duration определяет продолжительность выполнения анимации. Значение по умолчанию равняется 0s, т.е. отсутствие анимации.

Интерактивный пример

You may specify multiple durations; each duration will be applied to the corresponding property as specified by the transition-property (en-US) property, which acts as a master list. If there are fewer durations specified than in the master list, the user agent repeat the list of durations. If there are more durations, the list is simply truncated to the right size. In both case the CSS declaration stays valid.

Синтаксис

css
/* <time> values */
transition-duration: 6s;
transition-duration: 120ms;
transition-duration: 1s, 15s;
transition-duration: 10s, 30s, 230ms;

/* Глобальные значения */
transition-duration: inherit;
transition-duration: initial;
transition-duration: unset;

Values

<time>

Is a <time> denoting the amount of time the transition from the old value of a property to the new value should take. A time of 0s indicates that no transition will happen, that is the switch between the two states will be instantaneous. A negative value for the time renders the declaration invalid.

Formal syntax

transition-duration = 
<time [0s,∞]># (en-US)

Examples

transition-duration: 0.5s

transition-duration: 1s

transition-duration: 2s

transition-duration: 4s

Спецификации

Specification
CSS Transitions
# transition-duration-property

Совместимость с браузерами

BCD tables only load in the browser

Смотрите также