Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Specifying Time of the Animation | Animations
Advanced CSS Techniques
course content

Conteúdo do Curso

Advanced CSS Techniques

Advanced CSS Techniques

1. Introduction
2. Item Positioning
3. Transitions
4. Animations
5. Transformations
6. Adaptive/responsive websites and apps
7. Preprocessors

bookSpecifying Time of the Animation

Let's consider all possible ways to work with the animation time.

animation-duration property

animation-duration sets the time required for an animation to complete one cycle (change from the initial to the final state), measured in either seconds (s) or milliseconds (ms).

Let's run the following example and hover the box:

html

index

css

index

js

index

copy

animation-timing-function property

animation-timing-function determines how the animation progresses over time, controlling the acceleration and deceleration of the animation. The animation-timing-function can have the same values as the transition-timing-function property. Several predefined timing functions are available, such as linear, ease, and ease-in-out, or we can define a custom cubic bezier curve using the cubic-bezier() function.

Let's apply different time_functions to the boxes in the example:

html

index

css

index

js

index

copy

animation-delay property

animation-delay sets the time that should elapse before animation starts. It can be specified in seconds (s) or milliseconds (ms).

Let's apply different delays to the boxes in the example:

html

index

css

index

js

index

copy
We can specify the time delay for the animation to start, the time during which the animation will process, and also the animation progress over the time.

We can specify the time delay for the animation to start, the time during which the animation will process, and also the animation progress over the time.

Selecione a resposta correta

Tudo estava claro?

Como podemos melhorá-lo?

Obrigado pelo seu feedback!

Seção 4. Capítulo 2
some-alt