[英]SharePoint 2013 Background-Color Not Rendering in IE 8
我正在开发一个SP13站点。 IE8不会渲染标题栏的背景色。 它可以在9、10和其他浏览器中正常工作。 还有其他人遇到过这个问题吗?
CSS
.title
{
background-color: rgb(154, 153, 152);
}
HTML
<div class="title">
<div class="logo"></div>
<div class="search"></div>
</div>
在开发人员工具中,我可以看到样式已应用于元素,但显然无法渲染。 背景颜色呈现为白色。
显然,IE在检测到IE8时会添加此类。
.ms-core-needIEFilter
{
display: block;
filter: progid:DXImageTransform.Microsoft.gradient(GradientType=0,startColorstr=#d8ffffff,endColorstr=#d8ffffff);
background-color: transparent;
}
这将导致背景颜色被覆盖。 如果对样式应用!important
,则filter
属性会使背景颜色失真。 您必须在课堂上覆盖所有这些内容。
解
.your-class
{
filter: !important;
background-color: #0000 !important;
}
使用background
:而不是background-color
:
.title
{
background: rgb(154, 153, 152);
}
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.