日期:2013-11-19  浏览次数:21109 次

网页制造aiyiweb文章简介:用DIV+CSS实现圆角。

用DIV+CSS实现圆角。

<style>
 
div.bg{color:#fff;font-size:18px;font-weight:700;background:#ff3300;width:50%}
 
b{display:block;}
 
/*将所有b标签转成块级元素*/
 

div b.topb b,div b.bottomb b{height:1px;overflow:hidden;background:#ff3300;}
 
/*div标签内类名为topb/bottomb的那个b标签的css属性值--高为1px,溢出部份隐藏,背景色同div.bg的背景色*/
 

div b.topb,div b.bottomb{ background-color:white}
 
/*div标签内类名为topb/bottomb的背景色要与body背景色分歧*/
 

b.t1{margin:0 5px}
 
/*标签margin值将决定溢出的多少值被隐藏*/
 
b.t2{margin:0 3px}
 
b.t3{margin:0 2px}
 
b.t4{margin:0 1px;height:2px;}
 

</style>
 

<div align="center">
 
<div class="bg">
 

<b class="topb"><!--**此b标签所包含的b标签要进行溢出隐藏**-->
 
<b class="t1"></b>
 
<b class="t2"></b>
 
<b class="t3"></b>
 
<b class="t4"></b>
 

</b>
 
<br />
 
这是一个神奇的网站!<a href="http://www.Aiyiweb.Com/"><font color="#fff">Aiyiweb.Com!</font></a>
 
<br />
 
<br />
 

<b class="bottomb">
 
<b class="t4"></b>
 
<b class="t3"></b>
 
<b class="t2"></b>
 
<b class="t1"></b>
 
</b>
 

</div>
 
</div>