here's the site。如果将窗口调整为较小的尺寸。您会注意到,由于
.carousel-inner {
background-color: #03324c;
}
我可以删除它,但是指示器将不可见,并且底部会有一个空白。我知道图像大小不同,我尝试过调整大小,同样的问题。我已经尝试了2天很多东西,没有任何效果。
.carousel-inner {
background-color: #03324c;
}
.carousel-inner img {
margin-left: auto;
margin-right: auto;
margin-top: auto;
opacity: 0.7;
width: 100vw;
height: auto;
max-height: 100vh;
bottom: 0;
}
.carousel-caption h3 {
color: #fff !important;
}
最佳答案
您最好在background-image
元素上结合使用background-size:cover
和.item
。
例如,您的第一项将更改为此(只需删除img
标记):
<div class="item" style="min-height: 710px;">
<div class="carousel-caption">
<h3>New York</h3>
<p>The atmosphere in New York is lorem ipsum.</p>
</div>
</div>
相应的
.item
元素的样式如下:.item {
background-image: url(images/medium/quote.png);
background-size: cover;
background-repeat: no-repeat;
background-attachment: fixed;
background-position: center;
}
关于html - 引导传送带:移除底部边缘,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/39417022/