为什么我的Bootstrap Carousel没有缩放?

时间:2013-01-16 03:01:51

标签: javascript html twitter-bootstrap carousel

我已经找到了一些关于此的信息并找到了一些答案,但是当我将它应用于我的代码时,没有任何反应。当我调整窗口大小时,旋转木马不会调整大小,而是在右侧切断。关于如何正确扩展的任何想法?

<!DOCTYPE html>
<html lang="en">
  <head>
    <title>Title</title>
    <!-- Bootstrap -->
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <link href="css/bootstrap-responsive.css" rel="stylesheet">
    <link href="css/bootstrap.min.css" rel="stylesheet" media="screen">
    <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script>
    <script>
    $(document).ready(function(){
        $('.carousel').carousel({
          interval: 3000
        });
    });
    </script>
  </head>

<body>
    <div class="container">
        <div id="myCarousel" class="carousel slide">
            <!-- Carousel items -->
            <div class="carousel-inner">
            <div class="active item"><img src="img/guy.png" alt="Wedge Tire"></div>
            <div class="item"><img src="img/front.png" alt="Wedge Tire"></div>
            <div class="item"><img src="img/fleet.png" alt="Wedge Tire"></div>
            <div class="item"><img src="img/inside.png" alt="Wedge Tire"></div>
            <div class="item"><img src="img/more_tires.png" alt="Wedge Tire"></div>
            <div class="item"><img src="img/tires.png" alt="Wedge Tire"></div>
            <div class="item"><img src="img/truck.png" alt="Wedge Tire"></div>
            <div class="item"><img src="img/trucks.png" alt="Wedge Tire"></div>
            <div class="item"><img src="img/warehouse.png" alt="Wedge Tire"></div>
        </div>
        <!-- Carousel nav -->
        <a class="carousel-control left" href="#myCarousel" data-slide="prev">&lsaquo;</a>
        <a class="carousel-control right" href="#myCarousel" data-slide="next">&rsaquo;</a>
    </div>

    <script src="http://code.jquery.com/jquery-latest.js"></script>
    <script src="js/bootstrap.min.js"></script>
    </div><!--CONTAINER-->
</body>
</html>

1 个答案:

答案 0 :(得分:2)

验证了我的上述评论。 <link href="css/bootstrap-responsive.css" rel="stylesheet">需要追踪<link href="css/bootstrap.min.css" rel="stylesheet">