Bootstrap Col-sm-在Medium设备中的效果

时间:2016-11-05 22:48:28

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

我有一个类<div class="col-md-8 col-sm-8 col-sm-offset-2" id="wrapper-middle">的代码问题是当我使用Medium devices class 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>

1 个答案:

答案 0 :(得分:0)

Bootstrap col-类在所有大于指定大小的屏幕尺寸生效 - 即col-sm-8将在smmd和{{1}使用除非被覆盖。

相关问题