【发布时间】:2017-07-09 14:32:25
【问题描述】:
我尝试应用过渡属性以在悬停时图像更改时产生效果,但它似乎不起作用。请看看并帮助我。
.ow-outer {
background-color: #fff;
width: 200px;
height: 200px;
border-radius: 50%;
border: 1px solid #fff;
text-align: center;
padding: 20px;
background-image: url(../images/team-canada-light.png);
background-size: 120px;
background-repeat: no-repeat;
background-position: center;
transition: all 0.3s ease-in-out;
}
.ow-outer:hover {
background-image: url(../images/team-canada.png);
}
【问题讨论】:
-
代码中没有过渡。向我们展示你的尝试,不要指望我们为你写东西。
-
正如@junkfoodjunkie 所说,没有代码 = 没有答案
-
哦,是的!我的坏..更新了...
-
它不起作用,过渡只适用于具有整数的属性(高度、宽度、边距、颜色[rgba])
-
我不知道您在此处发布问题之前是否进行了任何研究,但这里有一个为您提供一些有效解决方案/解决方法的线程:stackoverflow.com/questions/9483364/…