Skip to content

Commit ebd774d

Browse files
Update 7-animation/2-css-animations/article.md
Co-authored-by: Muhammed Zakir <8190126+MuhammedZakir@users.noreply.github.com>
1 parent 5168eaa commit ebd774d

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

7-animation/2-css-animations/article.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,11 @@ In `transition-duration` we can specify how long the animation should take. The
8686

8787
In `transition-delay` we can specify the delay *before* the animation. For instance, if `transition-delay` is `1s` and `transition-duration` is `2s`, then the animation starts 1 second after the property change and the total duration will be 2 seconds.
8888

89-
Negative values are also possible. Then the animation starts from the middle. For instance, if `transition-duration` is `2s`, and the delay is `-1s`, then the animation takes 1 second and starts from the halfway point.
89+
Negative values are also possible. Then the animation is shown immediately, but the starting point of the animation will be after given value (time). For example, if `transition-delay` is `-1s` and `transition-duration` is `2s`, then animation starts from the halfway point and total duration will be 1 second. You can think it like this:
90+
91+
`transition-delay + transition-duration = animation duration`
92+
93+
So, if for instance, `transition-delay` is `-2s` and `transition-duration` is `2s`, then it will be as if there was no transitioning animation for that property and the changes are shown instantly. Therefore, "animation duration" must always be greater than `0s` for any animation to be shown.
9094

9195
Here the animation shifts numbers from `0` to `9` using CSS `translate` property:
9296

0 commit comments

Comments
 (0)