html - 如何使 bootstrap 轮播全宽且响应迅速

标签 html css twitter-bootstrap

如何使用 HTML 和 CSS 使我的 Bootstrap 轮播全宽并响应?

目前它只填充了 12 列,并且在移动版本中很难阅读幻灯片。

代码(http://www.bootply.com/6BQnZtGFlz):

.content-section-b {
  padding: 50px 0;
  background-color: #3C5A78;
}
.section-heading {
  color: #ffffff;
}
h2 {
  font-family: 'Lato', sans-serif;
  font-weight: 700;
  color: #3C5A78;
  line-height: 1;
  text-align:center;
  padding: 0 0 16px 0;
}
<div class="content-section-b">
  <div class="container">
    <div class="row">
      <div class="col-lg-12">
        <h2 class="section-heading">What Other Clients Are Saying</h2>
        <div id="carousel-example-generic" class="carousel slide" data-ride="carousel" data-interval="false">
          <!-- 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" role="listbox">
            <div class="item active">
              <img src="http://www.onvia.com/responsive/test_01_02.png" alt="Transit Distrcit and City Purchasing">
            </div>
            <div class="item">
              <img src="http://www.onvia.com/responsive/03_04.png" alt="Fire District and County Procurement">
            </div>
          </div>

          <!-- Controls -->
          <a class="left carousel-control" href="#carousel-example-generic" role="button" data-slide="prev">
            <span class="glyphicon glyphicon-chevron-left" aria-hidden="true"></span>
            <span class="sr-only">Previous</span>
          </a>
          <a class="right carousel-control" href="#carousel-example-generic" role="button" data-slide="next">
            <span class="glyphicon glyphicon-chevron-right" aria-hidden="true"></span>
            <span class="sr-only">Next</span>
          </a>
        </div>
      </div>
    </div>
  </div>
  <!-- /.container -->
</div>
<!-- /.content-section-->

最佳答案

刚刚删除了容器。这是 JSFiddle https://jsfiddle.net/Czechhinzur/q20gtLsw/

<div class="content-section-b">

<div class="row">
  <div class="col-lg-12">...

关于html - 如何使 bootstrap 轮播全宽且响应迅速,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/36615485/

相关文章:

html - 在跨度中将宽度设置为等于最小宽度是多余的吗?

javascript - 如何在不同页面上加载单个饼图

javascript - 函数完成后jQuery隐藏div

css - 如何在 CSS 中继承祖先而不是父级?

ruby-on-rails - Bourbon 与 Twitter Bootstrap for Rails 3.1

javascript - 手机和平板电脑专用网站

javascript - 无需刷新或重新加载页面即可更改图像

css - Codeigniter:无法链接引用的 css 文件

javascript - 溢出仅显示一条灰线

javascript - AngularJS Bootstrap - 控制台错误