我有一个带背景图片的简单文件。图像在屏幕上显示“回声”或自身偏移。该图像是标准的JPG文件,我尝试重新上传图像以确保它没有损坏。有什么想法吗?
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
<title>OutInMaine</title>
<style type="text/css">
html, body
{
height:100%;
width:100%;
background-image:url('maps/maine3.gif');
background-size:100% 100%;
background-repeat:no-repeat;
font-family:"Comic Sans MS", cursive, sans-serif;
}
footer
{
position:fixed;
bottom:0;
width:100%;
height:120px; /* choose any height */
}
</style>
</head>
<body onLoad="moveTo(200,200); resizeTo(600,850);">
<footer>
<form id="form" method="post" action="">
<br/><p align="right">Region to display:
<select name="regions" id="regions">
<option value="Aroostock">Aroostock</option>
<option value="DownEast/Acadia">DownEast/Acadia</option>
<option value="Highlands">Highlands</option>
<option value="Kennebec/Moose River">Kennebec/Moose River</option>
<option value="Lakes/Mountains">Lakes/Mountains</option>
<option value="Mid-coast">Mid-Coast</option>
<option value="Southern">Southern</option>
<option value="SpecificCity">Specific City</option>
<option value="Maine" selected="selected">Maine</option>
</select>
<input type="submit" name="go" value="Go"/>
</p>
</form>
</footer>
</body>
</html>
答案 0 :(得分:0)
在我的CSS下我有
html, body
{background-image:url("maine.gif");}
这导致我的图像显示两次,因为它加载了HTML部分和BODY部分。