<html><head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>background</title>
<style>
div{border:1px solid #ff0000;}
.yy{width:500px;height:500px;background:url(attachments/month_1112/p2011127145050.jpg) no-repeat;}
.yy1{width:500px;height:500px;background:url(attachments/month_1112/p2011127145050.jpg) no-repeat 200px 200px;}
.yy2{width:500px;height:500px;background:url(attachments/month_1112/p2011127145050.jpg) no-repeat 20% 20%;}
.yy3{width:500px;height:500px;background:url(attachments/month_1112/p2011127145050.jpg) no-repeat center center;}
.yy4{width:500px;height:500px;background:url(attachments/month_1112/p2011127145050.jpg) no-repeat 50% 50%;}
.yy5{width:500px;height:500px;background:url(attachments/month_1112/p2011127145050.jpg) no-repeat top center;}
.yy6{width:500px;height:500px;background:url(attachments/month_1112/p2011127145050.jpg) no-repeat left center;}
.yy7{width:500px;height:500px;background:url(attachments/month_1112/p2011127145050.jpg) no-repeat center bottom;}
.yy8{width:500px;height:500px;background:url(attachments/month_1112/p2011127145050.jpg) no-repeat center right;}
</style>
</head>
<body>
<div class="yy"></div>yy
<div class="yy1"></div>yy1
<div class="yy2"></div>yy2
<div class="yy3"></div>yy3
<div class="yy4"></div>yy4
<div class="yy5"></div>yy5
<div class="yy6"></div>yy6
<div class="yy7"></div>yy7
<div class="yy8"></div>yy8
</body>
</html>
比较比较,就能知道其中的奥秘。。。
原文来自:http://www.southy.cn/article.asp?id=84