【发布时间】:2012-12-29 09:57:45
【问题描述】:
我的 css3 中有一个背景图像,其中定义了图像和渐变。当班级从 on_time -> too_late 发生变化时,我也希望进行转换,反之亦然。
我无法在渐变上获得过渡。这在 css3 中是否以某种方式支持?
谢谢
div.too_late
{
color: White;
background-image: url(../Content/images/uit_white.png), -webkit-linear-gradient(top, #feb233 0%, #f39801 100%);
-webkit-transition-property: background-image, color;
-webkit-transition-duration: 5s;
}
div.on_time
{
color: #222;
background-image: url(../Content/images/uit_black.png), -webkit-linear-gradient(top, yellow 0%, #99ff33 100%);
-webkit-transition-property: background-image, color;
-webkit-transition-duration: 5s;
}
【问题讨论】:
标签: html css webkit css-transitions