我正在尝试让 CSS 背景颜色在页面加载后立即淡出,无需任何用户交互。这能做到吗?
最佳答案
这可以使用 CSS 动画来完成。有一个属性 animation-delay 可以以秒为单位设置。
animation-delay: 2s;
-webkit-animation-delay: 2s;
-moz-animation-delay: 2s;
-o-animation-delay: 2s;
这是 2 秒后背景褪色的简单示例:http://jsfiddle.net/eKAf2/
关于css - 背景颜色淡出,没有悬停,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/24316680/