2017-03-20 48 views
1

我創建了傳送帶引導,但它不起作用。傳送帶是滑塊類型,2個圖像將被嵌入到「img」標籤中。如果有什麼問題請幫忙。謝謝。My Bootstrap傳送帶類不工作

<!DOCTYPE html> 
 
<html lang="en"> 
 
<head> 
 
    <title>TATTOO</title> 
 
    <meta charset="utf-8"> 
 
    <meta class="viewport" content="width=device-width, initial-scale=1"> 
 
    <!-- Latest compiled and minified CSS --> 
 
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous"> 
 

 
<!-- Optional theme --> 
 
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap-theme.min.css" integrity="sha384-rHyoN1iRsVXV4nD0JutlnGaslCJuC7uwjduW9SVrLvRYooPp2bWYgmgJQIXwl/Sp" crossorigin="anonymous"> 
 

 
<!-- Latest compiled and minified JavaScript --> 
 
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js" integrity="sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa" crossorigin="anonymous"></script> 
 

 
</head> 
 
<body> 
 

 

 

 

 
<div class="container-fluid"> 
 
\t <div class="row">  
 
    <div class="col-xs-12" id="gifdivision"> 
 
     <!-- adding the carousel slider--> 
 
     <div class="carousel slide" id="myslider" data-ride="carousel"> 
 
      <div class="item active"> 
 
       <img src="#some image here"> 
 
       <div class="carousel-caption"><h2>caption here 1</h2></div><!--this is the carousel caption--> 
 
      </div> 
 
      <div class="item"> 
 
       <img src="#some image here"> 
 
       <div class="carousel-caption"><h2>caption here  2</h2></div><!--this is the carousel caption--> 
 
      </div> 
 
     </div><!-- this is the carousel slide div--> 
 
    </div><!-- end of col-xs-12 --> 
 
    </div><!-- end of 1st row--> 
 
</div><!--end of container--> 
 
</body> 
 
</html>

+4

引導JavaScript特性需要jQuery和你沒有在它上面的代碼。 –

+1

好的,謝謝我馬上加入。 –

回答

2

你錯過了jQuery和傳送帶標記是錯誤的。

引導3.x的旋轉木馬需要和身邊carousel-inneritem小號...

<div class="container-fluid"> 
    <div class="row"> 
     <div class="col-xs-12" id="gifdivision"> 
      <!-- adding the carousel slider--> 
      <div class="carousel slide" id="myslider" data-ride="carousel"> 
       <div class="carousel-inner"> 
        <div class="item active"> 
         <img src="//placehold.it/1200x400" class="center-block"> 
         <div class="carousel-caption"> 
          <h2>caption here 1</h2></div> 
         <!--this is the carousel caption--> 
        </div> 
        <div class="item"> 
         <img src="//placehold.it/1200x400" class="center-block"> 
         <div class="carousel-caption"> 
          <h2>caption here  2</h2></div> 
         <!--this is the carousel caption--> 
        </div> 
       </div> 
      </div> 
      <!-- this is the carousel slide div--> 

     </div> 
     <!-- end of col-xs-12 --> 
    </div> 
    <!-- end of 1st row--> 
</div> 
<!--end of container--> 

http://www.codeply.com/go/6koiOwGY1U

+1

非常感謝你指出這一點。 :) –