困惑,这是html:
<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="width=device-width" />
<title>Welcome</title>
<link rel="stylesheet/less" type="text/css" href="/Styles/CompiledLESS.less" />
<script src="/Scripts/JS/less-1.5.0.min.js"></script>
</head>
<body>
<div id="mainContentDiv">
<div>
<h2>Please Log In</h2>
<p>You must <a href="/Account">Log in</a> to use.</p>
</div>
</div>
</body>
</html>
Run Code Online (Sandbox Code Playgroud)
CSS 这是:
body {
background-color: #D5E6ED;
background-image: url("~/Images/Background.jpg");
background-position: center;
background-repeat: no-repeat;
color: #444444;
font-family: Verdana,Tahoma,Arial,"Helvetica Neue",Helvetica,Sans-Serif;
font-size: 71%;
margin: 0;
padding: 0;
}
#mainContentDiv
{
margin: 0 auto;
margin-top:0;
padding: 0;
width: 997px;
background-color:#fff;
}
Run Code Online (Sandbox Code Playgroud)
我看不出有什么不对,但结果是<body>当我用firebug检查时,标签与浏览器窗口的顶部没有齐平.
没有别的CSS,这就是全部.