gpt4 book ai didi

html - CSS3 : Transition of background color to transparent

转载 作者:太空宇宙 更新时间:2023-11-04 13:40:42 25 4
gpt4 key购买 nike

我想在 div 中进行转换:

  • 开始于 background-color:rgba(242, 245, 169, 1);

    ... 3 秒后...

  • background-color:rgba(242, 245, 169, 0); 结尾

并且...在两个阶段之间显示 background-color:rgba(242, 245, 169, 0.9); , background-color:rgba(242, 245, 169, 0,8);, background-color:rgba(242, 245, 169, 0.7);...

类似于this solution , 但没有':hover'。直接。

如何获取?

谢谢。

最佳答案

http://jsfiddle.net/BramVanroy/hakomq5L/

div {
width: 100px;
height: 100px;
animation: fade 3s forwards;
background-color:rgba(242, 245, 169, 1);
}

@keyframes fade {
from {background-color:rgba(242, 245, 169, 1);}
to {background-color:rgba(242, 245, 169, 0);}
}

关于html - CSS3 : Transition of background color to transparent,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/30457239/

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