In CSS3, you can use the "animation-delay" attribute to set the animation delay for a few seconds. The function of this attribute is to define when the animation starts. The unit of the attribute value can be seconds "s" or milliseconds. ms", the syntax is "animation-delay: time;".
The operating environment of this tutorial: Windows 10 system, CSS3&&HTML5 version, Dell G3 computer.
The animation-delay property defines when the animation starts.
animation-delay value unit can be seconds (s) or milliseconds (ms).
Tips: Negative values are allowed, -2s causes the animation to start immediately, but skips 2 seconds to enter the animation.
Syntax
animation-delay: time;
time is optional. Defines the time, in seconds or milliseconds, to wait before the animation starts. The default value is 0
The example is as follows;
The animation of the output result is delayed by 3 seconds, and the result is as follows:
(Learning video sharing:css video tutorial)
The above is the detailed content of How to set the delay for css3 animation for a few seconds. For more information, please follow other related articles on the PHP Chinese website!