Css 圆角代码

做到圆角样式可以重复使用,并且不同包含内容用不同的Class进行设置,可以更换背景样式.testboxcon 用了一个“相对”定位,主要是给里面的多个内容定位做一个参考最外面的div class=“testlayer” 主要是在在大布局时给圆角一个“区域”这个圆角在FF中,可以兼容显示。另外,建议大家在做圆角的时候,最好把弧度控制在5*5px的区域内,10px弧度不好看,而且计算起来比较麻烦
<style type="text/css">
<!--
#ibox01 {
overflow: hidden;
height: 1px;
margin-right: 5px;
margin-left: 5px;
background-color: #CC0000;
}
#ibox02 {
height: 1px;
margin-right: 3px;
margin-left: 3px;
border-right-width: 2px;
border-left-width: 2px;
border-right-style: solid;
border-left-style: solid;
border-right-color: #CC0000;
border-left-color: #CC0000;
overflow: hidden;
}
#ibox03 {
height: 1px;
margin-right: 2px;
margin-left: 2px;
border-right-width: 1px;
border-left-width: 1px;
border-right-style: solid;
border-left-style: solid;
border-right-color: #CC0000;
border-left-color: #CC0000;
overflow: hidden;
}
#ibox04 {
overflow: hidden;
height: 1px;
margin-right: 1px;
margin-left: 1px;
border-right-width: 1px;
border-left-width: 1px;
border-right-style: solid;
border-left-style: solid;
border-right-color: #CC0000;
border-left-color: #CC0000;
}
#ibox05 {
overflow: hidden;
height: 1px;
margin-right: 1px;
margin-left: 1px;
border-right-width: 1px;
border-left-width: 1px;
border-right-style: solid;
border-left-style: solid;
border-right-color: #CC0000;
border-left-color: #CC0000;
}
#boxcon {
border-right-width: 1px;
border-left-width: 1px;
border-right-style: solid;
border-left-style: solid;
border-right-color: #CC0000;
border-left-color: #CC0000;
}
.testlayer {
height: 200px;
width: 300px;
}
.testboxbg {
background-color: #666666;
}
.testboxcon {
height: 190px;
background-color: #666666;
position: relative;
}
-->
</style>
<div class="testlayer">
<div id="ibox">
  <div id="ibox01" class="testboxbg"></div>
  <div id="ibox02" class="testboxbg"></div>
  <div id="ibox03" class="testboxbg"></div>
  <div id="ibox04" class="testboxbg"></div>
  <div id="ibox05" class="testboxbg"></div>
   <div id="boxcon" class="testboxcon"></div>
  <div id="ibox05" class="testboxbg"></div>
  <div id="ibox04" class="testboxbg"></div>
  <div id="ibox03" class="testboxbg"></div>
  <div id="ibox02" class="testboxbg"></div>
  <div id="ibox01" class="testboxbg"></div>
</div>
</div>
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值