【发布时间】:2012-03-30 12:52:13
【问题描述】:
我正在使用这个 CSS:
#main{
border-radius: 50px;
border-bottom-right-radius: 4px;
border-bottom-left-radius: 4px;
-webkit-border-radius: 50px;
-webkit-border-bottom-right-radius: 4px;
-webkit-border-bottom-left-radius: 4px;
-moz-border-radius: 50px;
-moz-border-radius-bottomright: 4px;
-moz-border-radius-bottomleft: 4px;
}
它在 FF、Chrome、IE9(我认为)和 Safari 中完美运行... 但是在 IE8 中实在是太丑了,
有用户使用IE8,我试过.htc file 但不支持border-bottom-right-radius 和border-bottom-left-radius...
我正在寻找支持该功能的 JS 或 HTC 文件(或其他解决方案) 我只需要IE8,但如果它同时支持IE6和IE7,那就太好了!
谢谢!
【问题讨论】:
-
您可以使用border-radius的简写属性,该属性将与PIE一起使用以使角落不同。
-
您不需要使用
border-bottom-right-radius等。使用简写属性:border-radius:50px 50px 4px 4px等同于您发布的所有内容。您也可以对带有供应商前缀的代码执行此操作,因此您的整个代码实际上应该只有三行。另外,最好将标准(非前缀)声明放在供应商前缀声明之后(因为它是标准的,应该由支持它的浏览器使用)。
标签: javascript html css