border-radius(圆角)的几点说明

来源:互联网 发布:金蝶软件数据库 编辑:程序博客网 时间:2024/06/06 05:04

 border-radius:长度

 Firefox支持border-radius(圆角):-moz-border-radius:2px;

 webkit内核的Safari和Chrome支持border-radius(圆角):-webkit-border-radius:2px;

 Opera支持border-radius(圆角):border-radius:2px;

 IE不支持border-radius(圆角)

我们还可以随意指定圆角的位置,左上、左下、右上、右下四个方向。在firefox、webkit内核的Safari和Chrome和opera(css3)、中的具体书写格式如下:
-moz-border-radius-topleft / -webkit-border-top-left-radius / border-top-left-radius
-moz-border-radius-topright / -webkit-border-top-right-radius / border-top-right-radius
-moz-border-radius-bottomleft / -webkit-border-bottom-left-radius / border-bottom-left-radius
-moz-border-radius-bottomright / -webkit-border-bottom-right-radius /border-bottom-right-radius

以上代码不支持IE浏览器,经过多方测试和网上搜索终于找到解决不支持IE的方法:

 

1

.box-radius {

 

2

border-radius: 15px;

 

3

behavior: url(border-radius.htc);

 

4

}

下载htc文件(源码来自):http://www.htmlremix.com/css/curved-corner-border-radius-cross-browser
注意:htc文件是要放在服务器上,放在本地测试是不行的!

0 0