做web开发遇到的小问题,记录下来
问题描述页面div与顶部有缝隙问题
如图:
HTML代码:
@{
Layout = null;
}
<!DOCTYPE html>
<html>
<head>
<title>Top</title>
</head>
<body>
<div>
<a href="" class="logout">
<img onclick="LogOutJson();" src="http://www.cnblogs.com/Content/images/btn_hd_exit.gif" title="退出"
alt="" /></a>
<ul style="font-family:华文行楷">
</ul>
</div>
</body>
</html>
CSS:
body
{
background:red;
margin:0px;
padding:0px;
}
div
{
100%;
height: 59px;
overflow:hidden;
background-color:#D8ECF8;
}