支持“边界半径"在 IE 中 [英] Support for "border-radius" in IE

查看:33
本文介绍了支持“边界半径"在 IE 中的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有谁知道 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.

这篇关于支持“边界半径"在 IE 中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆