-moz-border-radius 导致在 IE8 中生成内联样式
我通过包含主要浏览器的样式属性向我的网站添加圆角 -
.optional{
-moz-border-radius: 10px;
-webkit-border-radius:10px;
border-radius:10px;
}
但当我在 IE8 中加载它时,浏览器会生成一堆内联样式,所有这些样式都会覆盖我之前定义的样式。我不想向所有这些样式添加 !important 以防止它们被覆盖。
现在,当我删除 -moz-border-radius: 10px;
时,一切正常。我不想测试我没有使用 IE 并加载单独的 CSS 文件。
我在网上找不到任何与此相关的信息。非常感谢帮助。
I am adding rounded corners to my website by including the style attributes for the major browsers -
.optional{
-moz-border-radius: 10px;
-webkit-border-radius:10px;
border-radius:10px;
}
When I load this up in IE8 though, the browser generates a bunch of inline styles, all of them overriding my previously defined styles. I do not want to add !important to all of these styles to keep them from being overridden.
Now, when I delete -moz-border-radius: 10px;
everything works fine. I do not want to have to test that I'm not using IE and load a separate CSS file.
I have not been able to find anything online regarding this. Help much appreciated.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
![扫码二维码加入Web技术交流群](/public/img/jiaqun_03.jpg)
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
IE8 不支持 border-radius 属性。CSS 兼容性-IE8 你必须使用行为属性。您可以在此处找到所需的 .htc 文件和文档:跨浏览器弯角
IE8 does not support border-radius property.CSS compatibility-IE8 You have to use behavior property. You can find the required .htc file and documentation here: cross browser curved corner