如何把背景拉大,并放置于特定的地方(代码)

来源:百度知道 编辑:UC知道 时间:2024/06/07 04:15:10
如何定位,详细点
若成功,加分

用ps先把背景图做大,然后用div的绝对定位就可以解决了!!!
看例子:
<!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">
<!--
.mo {
background-color: #009900;
position: absolute;
height: 500px;
width: 500px;
left: 144px;
top: 23px;
}
-->
</style>
</head>

<body>
<div class="mo">绝对定位</div>
</body>
</html>