开发者

-moz-border-radius causes inline styles to be generated in IE8

开发者 https://www.devze.com 2023-02-07 20:20 出处:网络
I am adding rounded corners to my website by including the style attributes for the major browsers - .optional{

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.


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

0

精彩评论

暂无评论...
验证码 换一张
取 消