简体   繁体   English

IE9 div具有边框半径和渗漏的背景色和边框

[英]IE9 divs with border-radius and bleeding background-colour and border

IE is showing a bleeding bg color and border on the header area for example here in IE9. IE是表示在首标区的出血背景颜色和边框例如此处在IE9。 The CSS is below, but I can't understand why.. CSS在下面,但是我不明白为什么。

#header-wrapper {
    position: relative;
    width: 98.2%;
    margin: 0 0.8%;
    overflow: hidden;
    height: 100px;
    border: 1px solid #333441;
    border-bottom: 0;
    background: -webkit-gradient(linear, left top, left bottom, from(#f6f6f6), to(#E4E4E4));
    background: -moz-linear-gradient(top,  #f6f6f6,  #e4e4e4);
    filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#f6f6f6', endColorstr='#e4e4e4');
    border-radius: 8px 8px 0 0;
    -webkit-border-top-right-radius: 8px;
    -webkit-border-top-left-radius: 8px;
}

Any ideas would be great.. 任何想法都很棒。

If available within your project constraints. 如果在您的项目约束范围内可用。 I would suggest using something like bourbon , which gives you all the mixins to do what you need, with browser compatibility in mind. 我建议使用诸如bourbon之类的东西,它在考虑到浏览器兼容性的情况下为您提供所有mixins来执行所需的操作。 However, such a tool requires SASS. 但是,这种工具需要SASS。 Which in the long run, isn't a bad idea to know / have. 从长远来看,知道/拥有不是一个坏主意。

Alternatively there are other tools like modernizr , that can help you in this case as well. 另外,还有其他工具,例如modernizr ,在这种情况下也可以为您提供帮助。

Moreover, you can dig into the source code CSS frameworks such as Twitter Bootstrap and grab the code they are using for border radius. 此外,您可以深入研究诸如Twitter Bootstrap之类的CSS源代码框架,并获取它们用于边界半径的代码。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM