Twitter bootstrap 引导传送带问题

Twitter bootstrap 引导传送带问题,twitter-bootstrap,carousel,Twitter Bootstrap,Carousel,我正在尝试实现Bootstrap3Carousel,但遇到了一些问题。选择“下一步”时,不会发生转换。我在这里尝试过这个话题的所有答案,但都没有成功。任何帮助都将不胜感激。这是我目前的代码: <head> ... <link rel="stylesheet" href="js/jquery-1.12.3.js"> <link rel="stylesheet" href="js/bootstrap.min.js">

我正在尝试实现Bootstrap3Carousel,但遇到了一些问题。选择“下一步”时,不会发生转换。我在这里尝试过这个话题的所有答案,但都没有成功。任何帮助都将不胜感激。这是我目前的代码:

    <head>
    ...
      <link rel="stylesheet" href="js/jquery-1.12.3.js">
      <link rel="stylesheet" href="js/bootstrap.min.js">
    </head>


<div id="carousel-example-generic" class="carousel slide" data-ride="carousel">
              <ol class="carousel-indicators">
                <li data-target="#carousel-example-generic" data-slide-to="0" class="active"></li>
                <li data-target="#carousel-example-generic" data-slide-to="1"></li>
                <li data-target="#carousel-example-generic" data-slide-to="2"></li>
                <li data-target="#carousel-example-generic" data-slide-to="3"></li>
              </ol>
              <div class="carousel-inner" role="listbox">
                <div class="item active">
                  <img src="images/slide-1-splash.png" alt="splash" class = "img-responsive">
                </div>
                <div class="item">
                  <img src="images/slide-2-interests.png" alt="interests" class = "img-responsive">
                </div>
                <div class="item">
                  <img src="images/slide-3-people.png" alt="people" class = "img-responsive">
                </div> 
                <div class="item">
                  <img src="images/slide-4-messages.png" alt="messages" class = "img-responsive">
                </div>
              </div>
              <a class="left carousel-control" href="#carousel-example-generic" role="button" data-slide="prev">
                <span class="glyphicon glyphicon-chevron-left" aria-hidden="true"></span>
                <span class="sr-only">Previous</span>
              </a>
              <a class="right carousel-control" href="#carousel-example-generic" role="button" data-slide="next">
                <span class="glyphicon glyphicon-chevron-right" aria-hidden="true"></span>
                <span class="sr-only">Next</span>
              </a>
            </div>

...

  • 看起来您忘记在项目中包含
    bootstrap.js
    。由于旋转木马使用了一些javascript代码,所以您只需要实现该文件

    我刚刚将您的代码复制到一个文件中,还包括了
    bootstrap.js
    文件,它开始工作

    我还注意到,您对javascript文件使用了错误的include。除此之外,您还没有包括
    bootstrap.css
    文件。尝试使用此选项(如果愿意,您可以通过自己的本地源更改源):


    看起来您忘记在项目中包含
    bootstrap.js
    。由于旋转木马使用了一些javascript代码,所以您只需要实现该文件

    我刚刚将您的代码复制到一个文件中,还包括了
    bootstrap.js
    文件,它开始工作

    我还注意到,您对javascript文件使用了错误的include。除此之外,您还没有包括
    bootstrap.css
    文件。尝试使用此选项(如果愿意,您可以通过自己的本地源更改源):

    
    
    console中有错误吗?console中有错误吗?感谢您的快速响应。我添加了标题,但它似乎仍然不起作用。安排的顺序重要吗?还有什么建议吗?你的控制台有错误吗?你的密码和我在小提琴上用的完全一样吗?也许你可以和你的代码样本共享一把小提琴?可能会有很大帮助。不,控制台中没有错误。我使用与您在自己的fiddle中使用的代码相同的代码进行了测试,但它的行为方式仍然相同。您是如何在头文件中实现bootstrap.js文件的?抱歉,注意到这太晚了。你对你的文件使用了错误的include。检查我编辑的答案,这应该可以解决问题。你也可以在谷歌上搜索一些关于如何在你的项目中包含css和js文件的教程。如果有帮助,请告诉我。谢谢您的快速回复。我添加了标题,但它似乎仍然不起作用。安排的顺序重要吗?还有什么建议吗?你的控制台有错误吗?你的密码和我在小提琴上用的完全一样吗?也许你可以和你的代码样本共享一把小提琴?可能会有很大帮助。不,控制台中没有错误。我使用与您在自己的fiddle中使用的代码相同的代码进行了测试,但它的行为方式仍然相同。您是如何在头文件中实现bootstrap.js文件的?抱歉,注意到这太晚了。你对你的文件使用了错误的include。检查我编辑的答案,这应该可以解决问题。你也可以在谷歌上搜索一些关于如何在你的项目中包含css和js文件的教程。如果有帮助,请告诉我。
    <link rel="stylesheet" type="text/css" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css">
    <script type="text/javascript" src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.min.js"></script>
    <script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.2/jquery.min.js"></script>