引导容器宽度以匹配网页大小

时间:2014-09-06 04:09:35

标签: html css twitter-bootstrap

我有一个转盘容器,我希望它的长度和宽度符合网页大小。我尝试使用“容器行”,它只对齐到网页的左边,但宽度没有扩展。

我该怎么做呢? 这是我想要的一个例子(紫色颜色div)http://getbootstrap.com/css/

<div class="container row"> 
        <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>
</ol>
<!-- Wrapper for slides -->
<div class="carousel-inner">

<!-- item 1 -->
<div class="item active">
<img src="img/Nielsen.png" alt="">
<div class="carousel-caption">
<h4>Jacob Nielsen's 10 usability principles </h4>
<p>Most used for evaluation of user interface usability</p></br>
</div>
</div>

<!-- item 2 -->
<div class="item">
<img src="img/UIParade.png" alt="">
<div class="carousel-caption">
<h4>UI Parade - User Interface Design Inspiration</h4>
<p>Ui Parade has good UI reference!.</p></br>
<a class="btn btn-primary" target="_blank" href="http://www.uiparade.com/">Learn 
more</a>
</div>
</div>
</div>
</div>
</div>

2 个答案:

答案 0 :(得分:3)

试试这样:

<div class="container-fluid">
            <div class="row">
                 Your content
            </div>
 </div>

答案 1 :(得分:0)

试试这个

<div class="container">
<div class="row">
<div class="col-md-12 col-xs-12">
    Your content
</div>
</div>
</div>