Bootstrap轮播格式和样式

时间:2018-04-24 20:43:26

标签: twitter-bootstrap-3 bootstrap-carousel

下面我有一个示例bootstrap carousel代码。我对默认外观的外观不满意,所以我试图修改它看起来更像我想要它。我已经尝试过使用inspecting来更改和插入值,但是不能完全按照我想要的那样去做CSS。有没有办法让图像底部的'标题'文字全宽(而不是居中,宽度只有85%左右),并将指针点移动到滑块下方,以黑色背景为中心?

我不希望任何人给我写这些代码,但我想帮助找出如何自己编写代码。

<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" role="listbox">
          <div class="item active">
            <img src="sites/default/files/images/wow2.jpg" alt="...">
            <div class="carousel-caption">
              <h3>Let's Play!</h3>
              <p>Let's have some fun!</p>
            </div>
          </div>
          <div class="item">
            <img src="sites/default/files/images/wow3.jpg" alt="...">
            <div class="carousel-caption">
              Let's play again!
            </div>
          </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>

0 个答案:

没有答案