1

我正在尝试将自举3传送带实施到我的网站中,但是左右两侧的幻灯片按钮无法正常工作,幻灯片点也是如此。任何人都可以在我的代码中发现问题吗?Twitter Bootstrap传送带按钮无法正常工作

<!doctype html> 
<html> 
<head> 
    <script src="//code.jquery.com/jquery-1.11.2.min.js"></script> 
    <script type="text/javascript" scr="js/bootstrap.js"></script> 
    <link rel="stylesheet" type="text/css" href="css/bootstrap.css"> 
    <title>Test page! </title> 
</head> 


<body> 
<div id="carousel-example-generic" class="carousel slide" data-ride="carousel"> 
    <!-- Indicators --> 
    <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> 
    </ol> 

    <!-- Wrapper for slides --> 
    <div class="carousel-inner" role="listbox"> 
    <div class="item active"> 
     <img src="img/deepcleaning1.jpg" alt="deepcleaning"> 
    </div> 
    <div class="item"> 
     <img src="img/deepcleaning2.jpg" alt="deepcleaning2"> 
    </div> 
    </div> 

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

</body> 
</html> 
+0

你能发布小提琴太 – Kushal

+0

你可以试试这个''''''有一个机会,它没有找到你的方式引用 –

+0

检查控制台错误的方式一旦!!! –

回答

0

听起来像一个类似的问题:Bootstrap Carousel does not work

有建议检查的JavaScript错误,特别是链接到jQuery的答案。似乎将http或https添加到URL可以解决问题。

<script src="http://code.jquery.com/jquery-1.11.2.min.js"></script> 

<script src="https://code.jquery.com/jquery-1.11.2.min.js"></script> 
0

原来,由于某种原因jQuery的链接不工作......我所做的只是下载jQuery的文件,并链接到它,而不是使用API​​的。奇迹般有效。

不知道为什么链接没有工作对我来说,虽然...