gpt4 book ai didi

html - Bootstrap 轮播百分比

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

每当我尝试以百分比形式(例如 100%)编辑 Bootstrap 轮播的高度时,轮播都没有响应。如何使它的高度为 100%?

    <div class="carousel-inner" role="listbox">
<div class="item">
<img class="first-slide" src="https://www.apple.com/osx/elcapitan-preview/static/osx-preview/overview/hero/image_large.jpg" alt="First slide">
<div class="container">
<div class="carousel-caption">
<h1>Utah Unicycling Society</h1>
<p>The only Unicycling Society in Utah</p>
</div>
</div>
</div>
<div class="item">
<img class="second-slide" src="http://images.nationalgeographic.com/wpf/media-live/photos/000/187/cache/canyons-utah_18730_990x742.jpg" alt="Second slide">
<div class="container">
<div class="carousel-caption">
<a href="Our-Team.html" id="join"><h1 style="color:#FFF">Join Us!</h1></a>
<p>Today, millions of people are realizing that unicycling is great. Join the Utah Unicycling Society, and become a better unicyler today.</p>
</div>
</div>
</div>
<div class="item active">
<img class="third-slide" src="New pictures/Hands Low.jpg" alt="Third slide">
<div class="container">
<div class="carousel-caption">
<a href="Donations.html" id="join"><h1 style="color:#FFF">Donate</h1></a>
<p>We can't get money if you don't donate!</p>
</div>
</div>
</div>
<div class="item">
<img class="fourth-slide" src="TheRoad.jpg" alt="Fourth slide">
<div class="container">
<div class="carousel-caption">
<h1>The Road to Success</h1>
<p>Here at Utah Unicycling Society, we believe in the road to success, and follow it every day.</p>
</div>
</div>
</div>
</div>

和CSS

    .carousel-inner{
width:100%;
height:100%;
}

如果可以的话请帮忙!!!

最佳答案

轮播将响应您的 img。用你想要的高度定义“幻灯片”类:

.first-slide {
height: 300px;
max-height: 300px;
}

对所有四张幻灯片都这样做。

关于html - Bootstrap 轮播百分比,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/32408888/

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