gpt4 book ai didi

CSS Transition 延迟进入但不退出

转载 作者:技术小花猫 更新时间:2023-10-29 11:00:06 25 4
gpt4 key购买 nike

我正在尝试使用 CSS 使转换延迟按如下方式工作。我想要 1 秒的延迟,但我想要 0 秒的延迟。

transition: width 0.3s ease-in 1s;
transition: width 0.3s ease-out 0s;

我有以下 jsFiddle

最佳答案

.active block 下设置延迟,因为该元素在转换为绿色时具有 active 类:

.sample {
padding: 20px;
background-color: #efefef;
transition: background-color 0.3s ease-out 0s;
}
.sample.active {
background-color: green;
transition: background-color 0.3s ease-in 1s;
}

JSFiddle

关于CSS Transition 延迟进入但不退出,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/31479594/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com