dw用div布局 布局后的顶部有空白 怎么都去不掉

Veir_dev Veir_dev 墨衍会员 · AI 创作全网分发 墨衍智能分发 通过墨衍一键同步至各平台 可同步平台 CSDN微信公众号微博知乎掘金百家号博客园抖音小红书 你的文章也可以这样分发 墨衍会员 ¥399起/年,写一次发全网 我也要 + 加入社区
急求帮忙~!
网页设计课的作业,要求用dw做 我用的cs6版本
在用div布局的时候,div的里面第一个div top栏不知怎么,在浏览器里面显示的时候顶部有空白,怎么都去不掉
下图是在dw界面拆分的设计图里面,顶部没有空白



下图是在dw的实时视图界面,他居然就有空白了……!!!


…………在谷歌浏览器里面也是这样,好郁闷…………

以下是部分代码,,求各位大神赐教一下~

<!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=utf-8" />
<title>仿MIUI官网-By熊伟</title>
<link href="index.css" rel="stylesheet" type="text/css" />
</head>

<body>
<div class="container">
<div class="head">
<p class="width">
<span id="h1">MIUI</span>
<span id="h2">首页    MIUI7.1    MIUI7    </span>下载    解锁    云服务    论坛</p>
</div>
<div class="body1">此处显示 class "body1" 的内容</div>
<div class="body2">此处显示 class "body2" 的内容</div>
<div class="bottom">此处显示 class "bottom" 的内容</div>
</div>
</body>
</html>

以下是在外链的css代码:
@charset "utf-8";
body{
margin: 0px auto;
padding:0px;
}
.container {
font-family: "微软雅黑";
background-color: #FEFEFE;
margin: 0px;
}
.head {
background-color: #220600;
color: #EBEBEB;
height: 49px;
margin: 0px auto;
}
.body1 {
height: 659px;
}
.body2 {
height: 167px;
}
.bottom {
height: 160px;
}
...全文
评论 7
收藏 已收藏
分享
返回顶部
Veir_dev
CSS 61,116 成员 60,701 内容