当更大时,Bootstrap Carousel Caption消失

时间:2013-04-04 00:00:22

标签: twitter-bootstrap

好吧我正在使用bootstrap来创建一个网页,我试图让旋转木马通过一些图像滑动,我已经从模板中复制了大部分内容。我的问题是当浏览器的宽度较大时,字幕似乎消失了。

我从此示例http://twitter.github.com/bootstrap/examples/carousel.html

复制了代码和css
<div id="myCarousel" class="carousel slide">
  <div class="carousel-inner">
    <div class="item active">
      <img src="assets/img/wood.jpg" alt="">
      <div class="container">
        <div class="carousel-caption">
          <h1>Web Design</h1>
          <p class="lead">A snappy website will attract new people!</p>
          <a class="btn btn-large btn-primary" href="#">Sign up today</a>
        </div>
      </div>
    </div>
    <div class="item">
      <img src="assets/img/wood.jpg" alt="">
      <div class="container">
        <div class="carousel-caption">
          <h1>App Design</h1>
          <p class="lead">CA App will let you reach out to your followers!</p>
          <a class="btn btn-large btn-primary" href="#">Learn more</a>
        </div>
      </div>
    </div>
    <div class="item">
      <img src="assets/img/wood.jpg" alt="">
      <div class="container">
        <div class="carousel-caption">
          <h1>Database Design</h1>
          <p class="lead">Databases are key to a companies success now adays!</p>
          <a class="btn btn-large btn-primary" href="#">Browse gallery</a>
        </div>
      </div>
    </div>
  </div>
  <a class="left carousel-control" href="#myCarousel" data-slide="prev">&lsaquo;</a>
  <a class="right carousel-control" href="#myCarousel" data-slide="next">&rsaquo;</a>
</div><!-- /.carousel -->

1 个答案:

答案 0 :(得分:1)

我认为您还需要包含Bootstrap响应式css文件。

应该在常规bootstrap.css文件之后添加,例如

<link href="assets/css/bootstrap.css" rel="stylesheet">
<link href="assets/css/bootstrap-responsive.css" rel="stylesheet">