css中让矩形有圆角

来源:互联网 发布:联合石油数据库官网 编辑:程序博客网 时间:2024/06/03 08:07

使用这个样式就OK了                       border-radius: 4px;


例子1

-webkit-border-radius:10px;
-moz-border-radius:10px;

例子2

height:300px;
line-height:300px;
-webkit-border-radius:300px;
-moz-border-radius:300px;

例子3

-webkit-border-top-left-radius:20px;
-webkit-border-bottom-right-radius:20px;
-moz-border-radius-topleft:20px;
-moz-border-radius-bottomright:20px;

例子4

height:300px;
-webkit-border-radius:180px;
-webkit-transform:rotatex(60deg);