我在使用超长距伞时遇到问题,由于某些原因,空格出现在空白处,我不知道它是由于我的代码还是我在某个地方出错了。我已经待了两天了。我在bootstrap 4网站上复制了jumbotron的代码。我可以为此提供一些帮助。如您所见,图片下方会出现空白。
.container_fluid.one {
background-size: cover;
height: 100vh;
background-color: #43E8E4;
}
.nav-item {
padding-right:20px;
font-size: 18px;
}
.info h1 {
margin-top: 170px;
line-height: 50px;
}
.info p {
font-size: 15px;
}
span {
color: #fffc00;
}
span .gold{
color: #fffc00;
}
.info p {
font-size: 18px;
}
.white {
color: #fff;
}
.navbar-dark .navbar-nav .nav-link:focus, .navbar-dark .navbar-nav .nav-link:hover {
color: #fffc00;
}
.leader {
margin-top: 110px;
width: 457px;
height: 316px;
}
.down {
margin-top: 60px;
}
.container_fluid.two {
background-size: cover;
min-height: 100vh;
background-color: #43E8E4;
}
.jumbotron {
margin-top: 0px;
}
<div class="container_fluid one">
<!--Navbar -->
<nav class="mb-1 navbar navbar-expand-lg navbar-dark orange lighten-1">
<a class="navbar-brand" href="#"><i class='bx bxl-stripe bx-md' style="color:#fffc00;"></i></a>
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarSupportedContent-555"
aria-controls="navbarSupportedContent-555" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse" id="navbarSupportedContent-555">
<ul class="navbar-nav ml-auto">
<li class="nav-item active">
<a class="nav-link" href="#">
<span class="gold">Home</span>
</a>
</li>
<li class="nav-item">
<a class="nav-link" href="#">Features</a>
</li>
<li class="nav-item">
<a class="nav-link" href="#">Pricing</a>
</li>
</ul>
</div>
</nav>
<!--/.Navbar -->
<section data-aos="zoom-in"data-aos-duration="1900">
<div class="container">
<div class="row">
<div class="col-md-6 text-white info">
<h1>I'll go above and beyond for <span>you.</span></h1>
<p>The world's best.</p>
<p><span>I am good at what i do.</span></p>
<button type="button" class="btn btn-outline-info white">Learn More</button>
</div>
<div class="col-md-6 text-right">
<img class="img-fluid leader" src="/images/undraw_site_stats_l57q.svg" alt="Responsive image">
</div>
</div>
</div>
</section>
<div class="container">
<div class="row">
<div class="col-md-12 text-center down">
<i class='bx bx-down-arrow bx-md bx-fade-down' style="color:#fffc00;"></i>
</div>
</div>
</div>
</div>
<div class="jumbotron jumbotron-fluid">
<div class="container">
<h1 class="display-4">Fluid jumbotron</h1>
<p class="lead">This is a modified jumbotron that occupies the entire horizontal space of its parent.</p>
</div>
</div>
<div class="container_fluid two">
答案 0 :(得分:0)
我必须在!important
之后放置margin: 0px
才能使其正常工作
.jumbotron {
margin-bottom: 0px!important;
}