【问题标题】:Bootstrap Col-sm- take effects in Medium devicesBootstrap Col-sm- 在 Medium 设备中获取效果
【发布时间】:2016-11-06 06:55:15
【问题描述】:

我有一个带有<div class="col-md-8 col-sm-8 col-sm-offset-2" id="wrapper-middle"> 类的代码,问题是当我使用Medium devicesclass col-sm-8 col-sm-offset-2 生效,当我删除class col-sm-8 col-sm-offset-2 时我的代码正常工作。

我的代码如下:

<div class="row">
              <div class="col-md-8 col-sm-8 col-sm-offset-2" id="wrapper-middle">
                <div id="carousel-generic" class="carousel slide" data-ride="carousel">
                  <!-- Indicators -->
                  <ol class="carousel-indicators">
                      <li data-target="#carousel-generic" data-slide-to="0" class="active"></li>
                      <li data-target="#carousel-generic" data-slide-to="1"></li>
                      <li data-target="#carousel-generic" data-slide-to="2"></li>
                  </ol>
                  <!-- Wrapper for slides -->
                  <div class="carousel-inner" role="listbox">
                      <div class="item active">
                          <img src="images/carousel/slide1.png" alt="Error picture">
                      </div>
                      <div class="item">
                          <img src="images/carousel/slide1.png" alt="Error picture">
                      </div>
                      <div class="item">
                          <img src="images/carousel/slide1.png" alt="Error picture">
                      </div>
                  </div>
                  <!-- Controls -->
                  <a class="left carousel-control" href="#carousel-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-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 id="words">
                  <header>
                      <h2><u>Lipsum</u></h2>
                  </header>
                  <article>
                      <div>
                          <p>
                              Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum. </p>

                      </div>
                  </article>

              </div>    

          </div>

【问题讨论】:

    标签: html css twitter-bootstrap twitter-bootstrap-3


    【解决方案1】:

    Bootstrap col- 类在所有大于指定尺寸的屏幕尺寸上都生效——即col-sm-8 将用于smmdlg,除非被覆盖。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2013-11-20
      • 1970-01-01
      • 2018-07-19
      • 2019-09-17
      • 2021-07-02
      相关资源
      最近更新 更多