支持“边界半径"在 IE 中

2022-01-30 00:00:00 internet-explorer css

有谁知道 Internet Explorer 是否/何时支持border-radius"CSS 属性?

Does anyone know if/when Internet Explorer will support the "border-radius" CSS attribute?

推荐答案

是的!2011年1月IE9发布时.

Yes! When IE9 is released in Jan 2011.

假设您希望所有四个边都为 15px:

Let's say you want an even 15px on all four sides:

.myclass {
 border-style: solid;
 border-width: 2px;
 -moz-border-radius: 15px;
 -webkit-border-radius: 15px;
 border-radius: 15px;
}

IE9 将使用默认的 border-radius,因此只需确保在所有调用边框半径的样式中都包含它.然后您的网站就可以支持 IE9.

IE9 will use the default border-radius, so just make sure you include that in all your styles calling a border radius. Then your site will be ready for IE9.

-moz-border-radius 用于 Firefox,-webkit-border-radius 用于 Safari 和 Chrome.

-moz-border-radius is for Firefox, -webkit-border-radius is for Safari and Chrome.

另外:别忘了声明你的IE编码是ie9:

Furthermore: don't forget to declare your IE coding is ie9:

<meta http-equiv="X-UA-Compatible" content="IE=9" />

一些懒惰的开发者有 <meta http-equiv="X-UA-Compatible" content="IE=7"/>.如果该标签存在,border-radius 将永远无法在 IE 中使用.

Some lazy developers have <meta http-equiv="X-UA-Compatible" content="IE=7" />. If that tag exists, border-radius will never work in IE.

相关文章