From 33058f2b292b3a581333bdfb21b8f671898c5060 Mon Sep 17 00:00:00 2001 From: Peter Bengtsson Date: Tue, 8 Dec 2020 14:40:17 -0500 Subject: initial commit --- files/zh-cn/web/css/animation-delay/index.html | 79 ++++++++++++++++++++++++++ 1 file changed, 79 insertions(+) create mode 100644 files/zh-cn/web/css/animation-delay/index.html (limited to 'files/zh-cn/web/css/animation-delay') diff --git a/files/zh-cn/web/css/animation-delay/index.html b/files/zh-cn/web/css/animation-delay/index.html new file mode 100644 index 0000000000..979bfa800c --- /dev/null +++ b/files/zh-cn/web/css/animation-delay/index.html @@ -0,0 +1,79 @@ +--- +title: animation-delay +slug: Web/CSS/animation-delay +tags: + - CSS + - CSS Animations + - CSS Property + - Experimental + - Reference +translation_of: Web/CSS/animation-delay +--- +
{{CSSRef}}{{SeeCompatTable}}
+ +

概述

+ +

animation-delay CSS属性定义动画于何时开始,即从动画应用在元素上到动画开始的这段时间的长度。

+ +

0s是该属性的默认值,代表动画在应用到元素上后立即开始执行。否则,该属性的值代表动画样式应用到元素上后到开始执行前的时间长度;

+ +

定义一个负值会让动画立即开始。但是动画会从它的动画序列中某位置开始。例如,如果设定值为-1s,动画会从它的动画序列的第1秒位置处立即开始。

+ +

如果为动画延迟指定了一个负值,但起始值是隐藏的,则从动画应用于元素的那一刻起就获取起始值。

+ +

通常用{{cssxref("animation")}}简写属性一次性设置动画效果较为方便。

+ +

{{cssinfo}}

+ +

语法

+ +
animation-delay: 3s;
+animation-delay: 2s, 4ms;
+
+ +

+ +
+
<time>
+
从动画样式应用到元素上到元素开始执行动画的时间差。该值可用单位为秒(s)和毫秒(ms)。如果未设置单位,定义无效。
+
+ +

正式语法

+ +
{{csssyntax("animation-delay")}}
+ +

示例

+ +

参见CSS animations

+ +

规范

+ + + + + + + + + + + + + + + + +
规范状态备注
{{SpecName('CSS3 Animations', '#animation-delay', 'animation-delay')}}{{Spec2('CSS3 Animations')}}
+ +

浏览器兼容性

+ + + +

{{Compat("css.properties.animation-delay")}}

+ +

参见

+ + -- cgit v1.2.3-54-g00ecf