最簡潔圖片圓角邊框-無需額外標籤

目前所能寫出的最簡潔圓角邊框了,不需要額外標籤。也可以只要一副圖片,但這時就得添加一個額外標籤。

 

這是以前寫的,今天又去寫的時候,發現還沒有以前寫的那麼感覺上優雅了。還是記下來,以免後忘。

 

<!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>
  <title> new document </title>
  <meta http-equiv="Content-Type" content="text/html;charset=UTF-8" />
  <meta name="generator" content="editplus" />
  <meta name="author" content="" />
  <meta name="keywords" content="" />
  <meta name="description" content="" />
  <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js"></script>
  <script type="text/javascript">
  <!--
	
  //-->
  </script>
  <style type="text/css">
	body {background:#fff;}
	div {overflow:hidden;zoom:1;}
	.box {padding-bottom:4px;width:190px;background:url("c-b-b.png") no-repeat left bottom;}
		.box h3 {margin:0;padding:0;background:url("t-bg.png") no-repeat;height:20px;}
		.box .c {border:1px solid #5c9ec0;border-width:0 1px;padding:10px;}
  </style>
 </head>

 <body>

	<div class="box">
		<h3>title</h3>
		<div class="c">
			<p>content</p>
		</div>
	</div>
 </body>
</html>

 

 

 

主要css:

 

.box {padding-bottom:4px;width:190px;background:url("c-b-b.png") no-repeat left bottom;}
    .box h3 {margin:0;padding:0;background:url("t-bg.png") no-repeat;height:20px;}
    .box .c {border:1px solid #5c9ec0;border-width:0 1px;padding:10px;}

 

 

 

附件box2.zip是一副圖片實現的圓角。

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章