微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

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

将Bootstrap 3的转盘指示器向下和向外移动到滑动容器之外是一种简单(和干净的)方法,因此它不会覆盖在照片上?请参阅下图,我想移动指标。

Link to live code

<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

原文地址:https://www.jb51.cc/bootstrap/234379.html

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。

相关推荐