在IE中支持“border

编程入门 行业动态 更新时间:2024-10-26 19:27:04
在IE中支持“border-radius”(Support for “border-radius” in IE)

有人知道/当Internet Explorer是否支持“border-radius”CSS属性?

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

最满意答案

是! 当IE9于2011年1月发布。

假设你想要四面均匀的15像素:

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

IE9将使用默认的border-radius ,因此只需确保您在所有调用边框半径的样式中包含它。 那么您的网站将准备好为IE9。

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

另外:不要忘记声明你的IE编码是ie9:

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

一些懒惰的开发者有<meta http-equiv="X-UA-Compatible" content="IE=7" /> 。 如果该标签存在,则border-radius将永远不会在IE中运行。

Yes! When IE9 is released in Jan 2011.

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 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 is for Firefox, -webkit-border-radius is for Safari and Chrome.

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

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

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

更多推荐

本文发布于:2023-07-30 07:48:00,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1336701.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:border

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!