0

我已经查找了一些关于此的信息并找到了一些答案,但是当我将它应用于我的代码时,什么也没有发生。当我调整窗口大小时,轮播不会调整大小,而是在右侧被切断。关于如何使其正确扩展的任何想法?

<!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>
4

1 回答 1

2

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

于 2013-01-16T03:32:57.397 回答