gpt4 book ai didi

html - 删除 CSS 中元素之间的空白

转载 作者:太空宇宙 更新时间:2023-11-04 14:05:00 26 4
gpt4 key购买 nike

<分区>

我制作了这个简单的 3 部分 css 布局,但它的表现不尽如人意。

CSS

#main-container {
width: 1000;
margin: 0 auto;
height:100%;
}

.header{
background-color:black;
width:100%;
height:150px;
}

.headertext{
color:#A3BB02;
font-size: xx-large;
}

.contenu{
width:100%;
background-color:#A3BB02;
}

.footer{
width:100%;
background-color:black;
min-height:100px;
}

HTML

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<title>Intro Projet Cloud</title>
<link href='/css/design.css' rel='stylesheet' type='text/css' />
</head>

<body>
<div id="main-container">
<div class="header">
<br/><br/><br/>
<span class="headertext">blablabla</span>
</div>
<div class="contenu">
<p>
blabla
</p>
<p>
blabla
</p>
<p>
blabla
</p>
<p>
<a href="projetcloudm2">Acceder a l'application</a>
</p>
</div>
<div class="footer"></div>
</div>
</body>
</html>

结果 result

contenu 与页眉和页脚之间的白条从何而来?可能的 css 中没有边距。

请注意,这是使用 google app engine 在 eclipse 中做一个 web 元素完成的

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com