0

好的,所以我正在使用引导程序创建一个网页,我试图让轮播通过一些图像滑动,并且我已经从模板中复制了大部分内容。我的问题是当浏览器的宽度变大时,字幕似乎消失了。

我从这个例子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 -->
4

1 回答 1

1

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

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

<link href="assets/css/bootstrap.css" rel="stylesheet">
<link href="assets/css/bootstrap-responsive.css" rel="stylesheet">
于 2013-04-05T08:39:13.653 回答