为什么我的旋转木马指示器在数字上?

时间:2014-12-15 08:27:57

标签: twitter-bootstrap carousel

enter image description here

我的代码工作正常,但我只是不知道为什么我的指标数字......

<div id = "myCarousel" class = "carousel slide">

    <ol class = "carousel-idicators">

        <li data-target = "#myCarousel" data-slide-to = "0" class = "active"> </li>
        <li data-target = "#myCarousel" data-slide-to = "1"> </li>
        <li data-target = "#myCarousel" data-slide-to = "2"> </li>

    </ol>
    <div class="carousel-inner">
        <div class="item active">
             <img class="img-responsive" width = "1600" height = "740" src="bohol.jpg" alt="bohol" align = "middle">
        </div>
        <div class="item">
             <img class="img-responsive" width = "1600" height = "740" src="cebu.jpg" alt="cebu">
        </div>
        <div class="item">
             <img class="img-responsive" width = "1600" height = "740"src="palawan.jpg" alt="palawan">
        </div>
    </div>                                  
</div>

任何人都可以帮助我。我一直在尝试学习bootstrap 3,我刚刚在教程中遵循相同的代码,但是当我尝试运行代码时,它看起来与教程没有相同的方式。

这将是我的部分:

<head>
    <title>My First Web Page</title>
    <meta name = "viewport" content = "width=device-width, initial-scale=1.0">
    <link href = "css/bootstrap.min.css" rel = "stylesheet">
    <link href = "css/styles.css" rel = "stylesheet">   
</head>

1 个答案:

答案 0 :(得分:1)

我认为你错过了js文件的链接。 首先你必须链接Jquery库然后是bootstrap js,如下例所示(请注意实际路径取决于你的js文件的位置):

<script src="/js/jquery-1.11.1.min.js"></script>
<script src="/js/bootstrap.min.js"></script>