我想在页面的一半中使用Bootstrap轮播(在桌面中)。这是我的代码:
HTML:
<div>
<div class="row">
<div class="col-md-6">
<div id="carousel-homepage" class="carousel slide" data-ride="carousel">
<ol class="carousel-indicators">
<li data-target="#carousel-homepage" data-slide-to="0" class="active"></li>
<li data-target="#carousel-homepage" data-slide-to="1"></li>
<li data-target="#carousel-homepage" data-slide-to="2"></li>
</ol>
<div class="carousel-inner">
<div class="item active">
<a href="#"><img src="http://placehold.it/1600x1600" /></a>
</div>
<div class="item">
<a href="#"><img src="http://placehold.it/1600x1600" /></a>
</div>
<div class="item">
<a href="#"><img src="http://placehold.it/1600x1600" /></a>
</div>
</div>
<a class="left carousel-control" href="#carousel-homepage" data-slide="prev">
<span class="glyphicon glyphicon-chevron-left"></span>
</a>
<a class="right carousel-control" href="#carousel-homepage" data-slide="next">
<span class="glyphicon glyphicon-chevron-right"></span>
</a>
</div>
</div>
<div class="col-md-6 low-padding-left"></div>
这是我的结果:
我想把旋转木马完全放在页面的一半。有什么建议吗?
答案 0 :(得分:0)
从第一个.col-md-6
div中删除填充或添加style="padding:0"