日期:2014-05-17  浏览次数:20655 次

css 用圆来制作圆角矩形

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title> 用圆来制作圆角矩形 </title>
<style type="text/css">
body,div,p{padding:0;margin:0;}

.box{width:300px; margin:10px;}

/* 圆的半径为5px 根据需要可以自由改变 */
.b_t,.b_t_i,.b_b,.b_b_i{background:url(http://dl.iteye.com/upload/attachment/466587/351b88fe-911f-3f15-96ad-1f02100c7422.png) no-repeat;}

.b_t{ background-position:top left; }
.b_t_i{ padding:0 5px; background-position:top right;}
.b_t_i div{ border-top:1px solid #153de9; height:5px;}

.b_m{ border:1px solid #153de9; border-width:0 1px 0 1px; padding:5px 10px; }

.b_b{ background-position:bottom left; }
.b_b_i{ padding:0 5px; background-position:bottom right;}
.b_b_i div{ border-bottom:1px solid #153de9; height:5px; }

.b_bg{background:#9dcce7;}

</style>
</head>
<body>

<div class="box"> 
	<div class="b_t"><div class="b_t_i"><div class="b_bg"></div></div></div>
	<div class="b_m b_bg"> 
		<p>用圆来制作圆角矩形</p>
		<p>用圆来制作圆角矩形</p>
		<p>用圆来制作圆角矩形</p>
	</div>
	<div class="b_b"><div class="b_b_i"><div class="b_bg"></div></div></div>
</div>

</body>
</html>
?