1、问题;图片不够大,background属性又不能拉伸图片;
2、解决办法:只能用个div,把其z-index值设为负,并使这个div大小为整个body大小,在div里用<img> ,并且body的background属性去掉,要不然会被遮住。
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>hello world</title>
</head>
<body>
<div id="Layer1" style="position:absolute; width:100%; height:100%; z-index:-1">
<img src="pictures/background.jpg" height="100%" width="100%"/>
</div>
</body>
</html>
2、解决办法:只能用个div,把其z-index值设为负,并使这个div大小为整个body大小,在div里用<img> ,并且body的background属性去掉,要不然会被遮住。
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>hello world</title>
</head>
<body>
<div id="Layer1" style="position:absolute; width:100%; height:100%; z-index:-1">
<img src="pictures/background.jpg" height="100%" width="100%"/>
</div>
</body>
</html>