问题描述
|
我在IE9中遇到了一件奇怪的事情,试图显示背景渐变。
基本上,我将多个类应用于容器对象。
<div class=\"gradient corners\"></div>
使用此CSS。
.gradient {
background-color: #96A7C5;
background-image: -webkit-gradient(
linear,left bottom,left top,color-stop(0.19,#6C86AD),color-stop(0.6,#96A7C5)
);
background-image: -moz-linear-gradient(
center bottom,#75A33A 19%,#8DC447 60%
);
.corners {
-webkit-border-radius: 10px;
-moz-border-radius: 10px;
border-radius: 10px;
}
为了在IE中获得渐变,我将过滤器垃圾应用于我的.gradient类。
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=\'#8DC447\',endColorstr=\'#75A33A\');
这样,渐变起作用了,但是我的圆角消失了。
因此,我尝试为过滤器声明添加条件。
<!--[if IE]>
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=\'#8DC447\',endColorstr=\'#75A33A\');
<![endif]-->
那带回了我的角落,但渐变消失了。
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)