HTML Dog
跳至导航

CSS 属性:transition-delay

在过渡(外观随时间发生的渐变)开始之前的延迟时间。

可能的值

描述示例
[时间]过渡开始前的延迟。默认为 0s(过渡立即开始)。1s
[时间][时间]多个延迟可以用逗号分隔。这些延迟将按顺序与其他过渡属性(如 transition-property)中列出的相应项匹配。.3s, 1s, 5s
inherit
initial
unset

示例


a {
    color: rgba(255,0,0,.5);
    transition-property: color;
    transition-duration: .3s;
    transition-delay: 1s;
}
/* A semi-transparent red link with a quick but delayed transition applied to the color property. */

a:hover {
    color: rgba(255,0,0,1);
}
/* When hovered over, the color of the link will turn solid red a second later.  */

浏览器支持

css-transitions 支持情况? 来自 caniuse.com 的关于 css-transitions 功能在各大浏览器中支持情况的数据。