css圆角的多种效果及实现方法

css圆角效果1

<html>
<head>
<title>css圆角效果</title>
<meta http-equiv="content-type" content="text/html; charset=gb2312">
<style type="text/css">
.RoundedCorner{background: #9BD1FA}
.rtop, .rbottom{display:block;background: #FFF}
.rtop b, .rbottom b{display:block;height: 1px;overflow: hidden; background: #9BD1FA}
.r1{margin: 0 5px}
.r2{margin: 0 3px}
.r3{margin: 0 2px}
.rtop b.r4, .rbottom b.r4{margin: 0 1px;height: 2px}
</style>
</head>
<body>
<div class="RoundedCorner">
<b class="rtop"><b class="r1"></b><b class="r2"></b><b class="r3"></b><b class="r4"></b></b>
<br>css无图片实现圆角框</br><br>
<b class="rbottom"><b class="r4"></b><b class="r3"></b><b class="r2"></b><b class="r1"></b></b>
</div>
</body>
</html>

 

css圆角效果2

<html>
<head>
<title>简写CSS圆角</title>
<style type="text/css">
.b1,.b2,.b3,.b4,.b1b,.b2b,.b3b,.b4b,.b{display:block;overflow:hidden;}
.b1,.b2,.b3,.b1b,.b2b,.b3b{height:1px;}
.b2,.b3,.b4,.b2b,.b3b,.b4b,.b{border-left:1px solid #999;border-right:1px solid #999;}
.b1,.b1b{margin:0 5px;background:#999;}
.b2,.b2b{margin:0 3px;border-width:2px;}
.b3,.b3b{margin:0 2px;}
.b4,.b4b{height:2px;margin:0 1px;}
.d1{background:#F7F8F9;}
</style>
</head>
<body>
<div>
<b class="b1"></b><b class="b2 d1"></b><b class="b3 d1"></b><b class="b4 d1"></b>
<div class="b d1">
<font style="font-size:26px;color:red; margin:0px 10px;">简写CSS圆角</font>
</div>
<b class="b4b d1"></b><b class="b3b d1"></b><b class="b2b d1"></b><b class="b1b"></b>
</div>
</body>
</html>

 

css圆角效果3(table实现)

<html>
<head>
<title>html圆角</title>
</head>
<body>
<TABLE cellSpacing=0 cellPadding=0 border=0>
<TBODY>
<TR>
<TD width=1></TD>
<TD width=1></TD>
<TD width=1></TD>
<TD width=274 bgColor=#999999></TD>
<TD width=1></TD>
<TD width=1></TD>
<TD width=1></TD>
</TR>
<TR>
<TD></TD>
<TD bgColor=#999999 colSpan=2></TD>
<TD bgColor=#f7f8f9></TD>
<TD bgColor=#999999 colSpan=2></TD>
<TD></TD>
</TR>
<TR>
<TD></TD>
<TD bgColor=#999999></TD>
<TD bgColor=#f7f8f9 colSpan=3></TD>
<TD bgColor=#999999></TD>
<TD></TD>
</TR>
<TR>
<TD width=1 bgColor=#999999></TD>
<TD height=60 bgColor=#f7f8f9 colSpan=5><font style="font-size:26px;color:red; margin:0px 10px;">html圆角</font></TD>
<TD width=1 bgColor=#999999></TD>
</TR>
<TR>
<TD></TD>
<TD bgColor=#999999></TD>
<TD bgColor=#f7f8f9 colSpan=3></TD>
<TD bgColor=#999999></TD>
<TD></TD>
</TR>
<TR>
<TD></TD>
<TD bgColor=#999999 colSpan=2></TD>
<TD bgColor=#f7f8f9></TD>
<TD bgColor=#999999 colSpan=2></TD>
<TD></TD>
</TR>
<TR>
<TD></TD>
<TD></TD>
<TD></TD>
<TD bgColor=#999999></TD>
<TD></TD>
<TD></TD>
<TD></TD>
</TR>
</TBODY>
</TABLE></body>
</html>

 

css圆角效果4

<html>
<head>
<title>css3D圆角</title>
<style type=text/css>
.raised{background:transparent;width:40%;}
.raised h1,.raised p{margin:0 10px;}
.raised h1{font-size:2em;color:#fff;}
.raised p{padding-bottom:0.5em;}
.raised .b1,.raised .b2,.raised .b3,.raised .b4,.raised .b1b,.raised .b2b,.raised .b3b,.raised .b4b{display:block;overflow:hidden;font-size:1px;}
.raised .b1,.raised .b2,.raised .b3,.raised .b1b,.raised .b2b,.raised .b3b{height:1px;}
.raised .b2{background:#ccc;border-left:1px solid #fff;border-right:1px solid #eee;}
.raised .b3{background:#ccc;border-left:1px solid #fff;border-right:1px solid #ddd;}
.raised .b4{background:#ccc;border-left:1px solid #fff;border-right:1px solid #aaa;}
.raised .b4b{background:#ccc;border-left:1px solid #eee;border-right:1px solid #999;}
.raised .b3b{background:#ccc;border-left:1px solid #ddd;border-right:1px solid #999;}
.raised .b2b{background:#ccc;border-left:1px solid #aaa;border-right:1px solid #999;}
.raised .b1{margin:0 5px;background:#fff;}
.raised .b2, .raised .b2b{margin:0 3px;border-width:0 2px;}
.raised .b3, .raised .b3b{margin:0 2px;}
.raised .b4, .raised .b4b{height:2px; margin:0 1px;}
.raised .b1b{margin:0 5px; background:#999;}
.raised .boxcontent{display:block;background:#ccc;border-left:1px solid #fff;border-right:1px solid #999;}
</STYLE>
</head>
<body>
<div class="raised">
<b class="b1"></b><b class="b2"></b><b class="b3"></b><b class="b4"></b>
<div class="boxcontent">
<h1>css3D圆角</h1>
</div>
<b class="b4b"></b><b class="b3b"></b><b class="b2b"></b><b class="b1b"></b>
</div>
</body>
</html>

 

你可能感兴趣的:(css圆角的多种效果及实现方法)