How to set the delay for css3 animation for a few seconds

WBOY
Release: 2022-03-16 11:35:03
Original
9524 people have browsed it

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;".

How to set the delay for css3 animation for a few seconds

The operating environment of this tutorial: Windows 10 system, CSS3&&HTML5 version, Dell G3 computer.

How to set the delay for a few seconds in css3 animation

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;
Copy after login

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;

   123  

注意:animation-delay 属性不兼容 Internet Explorer 9以及更早版本的浏览器。

Copy after login

The animation of the output result is delayed by 3 seconds, and the result is as follows:

How to set the delay for css3 animation for a few seconds

(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!

Related labels:
css
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!