CSS3设置任意圆角表格

主要属性:border-radius:5px;

任意一角也可以:

border-top-left-radius:5em;
border-top-right-radius:5em;
border-bottom-right-radius:5em;
border-bottom-left-radius:5em;


下面这种写法:“/”前是指圆角的水平半径,而“/”后是指圆角的垂直半径,他们两都遵循TRBL(上右下左)的顺序原则。

border-radius: 10px 15px 20px 30px 20px 30px 10px 15px;


也可以换成这样写:

  border-top-left-radius: 10px 20px;
  border-top-right-radius: 15px 30px;
  border-bottom-right-radius: 20px 10px;
  border-bottom-left-radius: 30px 15px;


下面这个是例子。

<html>
 <head>
  <style type="text/css">
.table{border-radius: 8px;border:1px solid #F00;}
</style> 
 </head>
 <body> 
  <table class="table"> 
   <tbody>
    <tr> 
     <td> 啊啊啊 </td> 
     <td> 啊啊啊 </td> 
     <td> 啊啊啊 </td> 
    </tr> 
    <tr> 
     <td> 啊啊啊 </td> 
     <td> 啊啊啊 </td> 
     <td> 啊啊啊 </td> 
    </tr> 
   </tbody>
  </table>   
 </body>
</html>




  • 1
    点赞
  • 3
    收藏
    觉得还不错? 一键收藏
  • 1
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值