gpt4 book ai didi

html - div之间的空白

转载 作者:行者123 更新时间:2023-11-28 07:03:05 25 4
gpt4 key购买 nike

我试过让空白消失无济于事!下面我粘贴了我的代码。问题发生在 .jumbotron.footer 之间。我知道它一定是带有边距或填充的东西,可能带有 .jumbotron h2

HTML:

<!doctype html>
<html>
<head>
<link rel="stylesheet" type="text/css" href="CSS/main.css"/>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css">
<title>Niall's Portfolio</title>
</head>

<body>
<audio src="/Users/kmahford/Music/iTunes/iTunes Media/Music/Hiatus Kaiyote/Choose Your Weapon/16 Only Time All the Time_ Making Friends with Studio Owl.m4a" autoplay></audio>
<div class="header">
<div class="container">
<div class="row">
<div class="col-md-4">
<h1>ZAH</h1>
</div>
<div>
<ul class="pull-right">
<li><a href="AboutMe.html">About Me</a></li>
<li><a href="Contact.html">Contact</a></li>
</ul>
</div>
</div>
</div>
</div>

<div class="jumbotron">
<div class="container">
<h2>making <span>rustic</span> <span id="and">and</span> <span>modern</span> meet.</h2>
</div>
</div>

<div class="footer">
<p>&copy; Che Co.</p>
</div>
</body>
</html>

CSS:

/* Jumbotron */

.jumbotron {
height: 600px;
background: url("https://images.unsplash.com/photo-1432821596592-e2c18b78144f?q=80&fm=jpg&s=a4598570a3286ea23369fdefe46953ba") no-repeat center center;
background-size: cover;}
.jumbotron h2 {
margin-top: 0;
text-align: center;
color: #1E91B2;
padding-top: 300px;
font-size: 50px;
font-weight: 400;}
.jumbotron span {
font-weight: 800;}
.jumbotron #and {
color: #FF8208;
font-weight: 400;}

最佳答案

默认情况下,超大屏幕类的底部边距为 30 像素。删除它:

div.jumbotron {margin-bottom:0;}

jsFiddle example

请注意,这是 间距问题的原因,您必须通过使您的 CSS 更具体来用您自己的 CSS 覆盖 Bootstrap 的 CSS 才能使其生效。

关于html - div之间的空白,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/33113182/

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