twitter-bootstrap-3 – Bootstrap 3默认旋转木马:如何将指针向下和向外移动?

前端之家收集整理的这篇文章主要介绍了twitter-bootstrap-3 – Bootstrap 3默认旋转木马:如何将指针向下和向外移动?前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
将Bootstrap 3的转盘指示器向下和向外移动到滑动容器之外是一种简单(和干净的)方法,因此它不会覆盖在照片上?请参阅下图,我想移动指标。

@L_404_0@

<div class="container">
<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">
<div class="item active">
<img src="http://placehold.it/1170x300.jpg" alt="...">
</div>

<div class="item">
<img src="http://placehold.it/1170x300.jpg" alt="...">
</div>

<div class="item">
<img src="http://placehold.it/1170x300.jpg" alt="...">
</div>

</div>

<!-- Controls -->
<a class="left carousel-control" href="#carousel-example-generic" data-slide="prev">
<span class="glyphicon glyphicon-chevron-left"></span>
</a>
<a class="right carousel-control" href="#carousel-example-generic" data-slide="next">
<span class="glyphicon glyphicon-chevron-right"></span>
</a>
</div>

</div><!--//container -->

解决方法

你可以像这样把它们推到滑块下方
.carousel-indicators {
  bottom:-50px;
}

将空间留在圆盘传送带下方,以便推送的指示器不会干扰滑块下面的内容

.carousel-inner {
   margin-bottom:50px;
}

Bootply Demo

猜你在找的Bootstrap相关文章