2015-09-05 117 views
0

每当我尝试以百分比形式(例如100%)编辑Bootstrap传送带的高度时,传送带不响应。我如何使它的高度达到100%?Bootstrap传送带百分比

<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%; 
    } 

如果可以请帮帮忙,!

+0

请提供一些此行为的示例代码,以便我们可以帮助您进行调试。 –

+0

你有没有尝试调整外部旋转木马div?另外,高度:100%并不意味着屏幕的100%,这意味着.carousel内部和它的内容填充div内部/正上方的整个高度。 – CHoltzman

+0

这是我的网站,如果你想看到它 – NoobCoder

回答

0

传送带将响应您的IMG。 定义“幻灯片”类你要喜欢这个高度:

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

做到这一点对所有的四张幻灯片。