我有一個在大屏幕上很好的Bootstrap旋轉木馬,但如果我縮小屏幕尺寸,指標會移動到圖像下方,我完全失去標題文字。我肯定錯過了什麼。我想要在整個圖像上顯示指標和文字,就像更大的屏幕一樣。任何幫助讚賞...Bootstrap圖像旋轉木馬文本/指標在小屏幕上丟失
<div class="container" id="index">
<div id="carousel-example-generic" class="carousel slide" data-ride="carousel">
<!-- Indicators -->
<ol class="carousel-indicators">
<li data-target="#carousel-example-generic" data-slide-to="0" class="active"></li>
<li data-target="#carousel-example-generic" data-slide-to="1"></li>
<li data-target="#carousel-example-generic" data-slide-to="2"></li>
</ol>
<!-- Wrapper for slides -->
<div class="carousel-inner" role="listbox">
<div class="item active">
<div class="carousel-caption">
<h3>Example headline</h3>
<p>Example description</p>
</div>
<img src="img/lesson8-portfolioheroimage2.jpg" alt="...">
</div>
<div class="item">
<img src="img/portfolioheroimage.jpg" alt="...">
<div class="carousel-caption">
<h3>Example headline</h3>
<p>Example description</p>
</div>
</div>
<div class="item">
<img src="img/portfolioheroimage3.jpg" alt="...">
<div class="carousel-caption">
<h3>Example headline</h3>
<p>Example description</p>
</div>
</div>
</div>
<!-- Controls -->
<a class="left carousel-control" href="#carousel-example-generic" role="button" data-slide="prev">
<span class="glyphicon glyphicon-chevron-left" aria-hidden="true"></span>
<span class="sr-only">Previous</span>
</a>
<a class="right carousel-control" href="#carousel-example-generic" role="button" data-slide="next">
<span class="glyphicon glyphicon-chevron-right" aria-hidden="true"></span>
<span class="sr-only">Next</span>
</a>
</div>
這裏是我的CSS是否有幫助.carousel { \t保證金左:-15px; \t margin-right:-15px; } .carousel-inner { \t height:400px; } .carousel-caption { \t padding-bottom:450px; } .carousel-control { \t margin:200px 0; } – James
https://bootsnipp.com/snippets/featured/simple-responsive-carousel這是一個Bootstrap響應旋轉木馬的例子。你有CSS和HTML代碼。 – F0XS