欢迎使用CSDN-markdown编辑器

前缀

-moz(例如 -moz-border-radius)用于Firefox
-webkit(例如:-webkit-border-radius)用于Safari和Chrome。
例1

round {

padding:10px; width:300px; height:50px;
border: 5px solid #dedede;
-moz-border-radius: 15px;      /* Gecko browsers */
-webkit-border-radius: 15px;   /* Webkit browsers */
border-radius:15px;            /* W3C syntax */

}
效果:
这里写图片描述

例2:无边框

round {

padding:10px; width:300px; height:50px;
background:#FC9; 
-moz-border-radius: 15px;
-webkit-border-radius: 15px;
border-radius:15px;

}
效果:
这里写图片描述

书写顺序

/* Gecko browsers */
-moz-border-radius: 5px;
/* Webkit browsers */
-webkit-border-radius: 5px;
/* W3C syntax - likely to be standard so use for future proofing */
border-radius:10px;
其它

支持上、右、下、左

border-radius:5px 15px 20px 25px;
支持拆分书写

/* Gecko browsers */
-moz-border-radius-topleft: 20px;
-moz-border-radius-topright: 0;
-moz-border-radius-bottomleft: 0;
-moz-border-radius-bottomright: 20px;

/* Webkit browsers */
-webkit-border-top-left-radius: 20px;
-webkit-border-top-right-radius: 0;
-webkit-border-bottom-left-radius: 0;
-webkit-border-bottom-right-radius: 20px;

/* W3C syntax */
border-top-left-radius: 20px;
border-top-right-radius: 0;
border-bottom-right-radius: 0;
border-bottom-left-radius: 20px;
支持性

浏览器 支持性
Firefox(2、3+) √
Google Chrome(1.0.154+…) √
Google Chrome(2.0.156+…) √
Safari(3.2.1+ windows) √
Internet Explorer(IE7, IE8) ×
Opera 9.6 ×

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值