如何通过引导或css自定义旋转木马的宽度?
我目前主要在我的网页中使用这段代码:
<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="..." alt="...">
<div class="carousel-caption">
...
</div>
</div>
<div class="item">
<img src="..." alt="...">
<div class="carousel-caption">
...
</div>
</div>
...
</div>
<!-- Controls -->
<a class="left carousel-control" href="#carousel-example-generic" role="button" data-slide="prev">
<span class="glyphicon glyphicon-chevron-left"></span>
</a>
<a class="right carousel-control" href="#carousel-example-generic" role="button" data-slide="next">
<span class="glyphicon glyphicon-chevron-right"></span>
</a>
</div>
我试过给身体设定一个宽度,但那是行不通的。
提前感谢!
发布于 2014-07-22 18:05:02
您有两个选项可以将旋转木马的宽度设置为
覆盖此默认引导css/less。不要忘记添加媒体查询来调整宽度,因为这将适用于全球范围。
这只会影响旋转木马的宽度。
发布于 2014-07-22 18:05:02
宽度相对于旋转木马所在的父容器。因此,您需要设置要在其中包装旋转木马的div的ID/类的宽度。您还可以在引导容器(并在全局范围内更改容器宽度)或列中设置它,以获得更宽松的专用性。
https://stackoverflow.com/questions/24894337
复制相似问题