2016-04-27 3 views
0

Ich versuche, die Carousel Template zu arbeiten. Ich habe Bootstrap heruntergeladen, alle erforderlichen Pfade in der Datei index.html nach dem Kopieren geändert. Wenn ich jedoch lokal index.html öffne, sieht es immer noch anders aus als es sein soll. Ich schaute online und scheint, dass andere Leute das gleiche Problem erfahren haben und das Problem scheint zu sein, dass jQuery nicht funktionierte und dass #myCarousel Aufruf sein musste, die ich auch versuchte, mit meinem kleinen Skript am Ende meines Kopfes zu tun. Bootstrap Karussell Vorlage funktioniert nicht

ich kann nicht herausfinden, was falsch ist ... Danke

<!DOCTYPE html> 
<html lang="en"> 
    <head> 
     <meta charset="utf-8"> 
     <meta http-equiv="X-UA-Compatible" content="IE=edge"> 
     <meta name="viewport" content="width=device-width, initial-scale=1"> 

     <!-- Bootstrap core CSS --> 
     <link href="css/bootstrap.min.css" rel="stylesheet"> 

     <!-- IE10 viewport hack for Surface/desktop Windows 8 bug --> 
     <link href="css/ie10-viewport-bug-workaround.css" rel="stylesheet"> 

     <!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries --> 
     <!--[if lt IE 9]> 
      <script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script> 
      <script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script> 
     <![endif]--> 

     <!-- Custom styles for this template --> 
     <link href="carousel.css" rel="stylesheet"> 
     <script> 
     $(function(){ 
      $('#myCarousel').carousel(); 
     }); 
     </script> 
    </head> 
<!-- NAVBAR 
================================================== --> 
    <body> 
     <div class="navbar-wrapper"> 
      <div class="container"> 
       <nav class="navbar navbar-inverse navbar-static-top"> 
        <div class="container"> 
         <div class="navbar-header"> 
          <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false" aria-controls="navbar"> 
           <span class="sr-only">Toggle navigation</span> 
           <span class="icon-bar"></span> 
           <span class="icon-bar"></span> 
           <span class="icon-bar"></span> 
          </button> 
          <a class="navbar-brand" href="#">Project name</a> 
         </div> 
         <div id="navbar" class="navbar-collapse collapse"> 
          <ul class="nav navbar-nav"> 
           <li class="active"><a href="#">Home</a></li> 
           <li><a href="#about">About</a></li> 
           <li><a href="#contact">Contact</a></li> 
           <li class="dropdown"> 
            <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">Dropdown <span class="caret"></span></a> 
            <ul class="dropdown-menu"> 
             <li><a href="#">Action</a></li> 
             <li><a href="#">Another action</a></li> 
             <li><a href="#">Something else here</a></li> 
             <li role="separator" class="divider"></li> 
             <li class="dropdown-header">Nav header</li> 
             <li><a href="#">Separated link</a></li> 
             <li><a href="#">One more separated link</a></li> 
            </ul> 
           </li> 
          </ul> 
         </div> 
        </div> 
       </nav> 

      </div> 
     </div> 

     <!-- Carousel 
     ================================================== --> 
     <div id="myCarousel" class="carousel slide" data-ride="carousel"> 
      <!-- Indicators --> 
      <ol class="carousel-indicators"> 
       <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" role="listbox"> 
       <div class="item active"> 
        <img class="first-slide" src="data:image/gif;base64,R0lGODlhAQABAIAAAHd3dwAAACH5BAAAAAAALAAAAAABAAEAAAICRAEAOw==" alt="First slide"> 
        <div class="container"> 
         <div class="carousel-caption"> 
          <h1>Example headline.</h1> 
          <p>Note: If you're viewing this page via a <code>file://</code> URL, the "next" and "previous" Glyphicon buttons on the left and right might not load/display properly due to web browser security rules.</p> 
          <p><a class="btn btn-lg btn-primary" href="#" role="button">Sign up today</a></p> 
         </div> 
        </div> 
       </div> 
       <div class="item"> 
        <img class="second-slide" src="data:image/gif;base64,R0lGODlhAQABAIAAAHd3dwAAACH5BAAAAAAALAAAAAABAAEAAAICRAEAOw==" alt="Second slide"> 
        <div class="container"> 
         <div class="carousel-caption"> 
          <h1>Another example headline.</h1> 
          <p>Cras justo odio, dapibus ac facilisis in, egestas eget quam. Donec id elit non mi porta gravida at eget metus. Nullam id dolor id nibh ultricies vehicula ut id elit.</p> 
          <p><a class="btn btn-lg btn-primary" href="#" role="button">Learn more</a></p> 
         </div> 
        </div> 
       </div> 
       <div class="item"> 
        <img class="third-slide" src="data:image/gif;base64,R0lGODlhAQABAIAAAHd3dwAAACH5BAAAAAAALAAAAAABAAEAAAICRAEAOw==" alt="Third slide"> 
        <div class="container"> 
         <div class="carousel-caption"> 
          <h1>One more for good measure.</h1> 
          <p>Cras justo odio, dapibus ac facilisis in, egestas eget quam. Donec id elit non mi porta gravida at eget metus. Nullam id dolor id nibh ultricies vehicula ut id elit.</p> 
          <p><a class="btn btn-lg btn-primary" href="#" role="button">Browse gallery</a></p> 
         </div> 
        </div> 
       </div> 
      </div> 
      <a class="left carousel-control" href="#myCarousel" 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="#myCarousel" role="button" data-slide="next"> 
       <span class="glyphicon glyphicon-chevron-right" aria-hidden="true"></span> 
       <span class="sr-only">Next</span> 
      </a> 
     </div><!-- /.carousel --> 


     <!-- Marketing messaging and featurettes 
     ================================================== --> 
     <!-- Wrap the rest of the page in another container to center all the content. --> 

     <div class="container marketing"> 

      <!-- Three columns of text below the carousel --> 
      <div class="row"> 
       <div class="col-lg-4"> 
        <img class="img-circle" src="data:image/gif;base64,R0lGODlhAQABAIAAAHd3dwAAACH5BAAAAAAALAAAAAABAAEAAAICRAEAOw==" alt="Generic placeholder image" width="140" height="140"> 
        <h2>Heading</h2> 
        <p>Donec sed odio dui. Etiam porta sem malesuada magna mollis euismod. Nullam id dolor id nibh ultricies vehicula ut id elit. Morbi leo risus, porta ac consectetur ac, vestibulum at eros. Praesent commodo cursus magna.</p> 
        <p><a class="btn btn-default" href="#" role="button">View details &raquo;</a></p> 
       </div><!-- /.col-lg-4 --> 
       <div class="col-lg-4"> 
        <img class="img-circle" src="data:image/gif;base64,R0lGODlhAQABAIAAAHd3dwAAACH5BAAAAAAALAAAAAABAAEAAAICRAEAOw==" alt="Generic placeholder image" width="140" height="140"> 
        <h2>Heading</h2> 
        <p>Duis mollis, est non commodo luctus, nisi erat porttitor ligula, eget lacinia odio sem nec elit. Cras mattis consectetur purus sit amet fermentum. Fusce dapibus, tellus ac cursus commodo, tortor mauris condimentum nibh.</p> 
        <p><a class="btn btn-default" href="#" role="button">View details &raquo;</a></p> 
       </div><!-- /.col-lg-4 --> 
       <div class="col-lg-4"> 
        <img class="img-circle" src="data:image/gif;base64,R0lGODlhAQABAIAAAHd3dwAAACH5BAAAAAAALAAAAAABAAEAAAICRAEAOw==" alt="Generic placeholder image" width="140" height="140"> 
        <h2>Heading</h2> 
        <p>Donec sed odio dui. Cras justo odio, dapibus ac facilisis in, egestas eget quam. Vestibulum id ligula porta felis euismod semper. Fusce dapibus, tellus ac cursus commodo, tortor mauris condimentum nibh, ut fermentum massa justo sit amet risus.</p> 
        <p><a class="btn btn-default" href="#" role="button">View details &raquo;</a></p> 
       </div><!-- /.col-lg-4 --> 
      </div><!-- /.row --> 


      <!-- START THE FEATURETTES --> 

      <hr class="featurette-divider"> 

      <div class="row featurette"> 
       <div class="col-md-7"> 
        <h2 class="featurette-heading">First featurette heading. <span class="text-muted">It'll blow your mind.</span></h2> 
        <p class="lead">Donec ullamcorper nulla non metus auctor fringilla. Vestibulum id ligula porta felis euismod semper. Praesent commodo cursus magna, vel scelerisque nisl consectetur. Fusce dapibus, tellus ac cursus commodo.</p> 
       </div> 
       <div class="col-md-5"> 
        <img class="featurette-image img-responsive center-block" data-src="holder.js/500x500/auto" alt="Generic placeholder image"> 
       </div> 
      </div> 

      <hr class="featurette-divider"> 

      <div class="row featurette"> 
       <div class="col-md-7 col-md-push-5"> 
        <h2 class="featurette-heading">Oh yeah, it's that good. <span class="text-muted">See for yourself.</span></h2> 
        <p class="lead">Donec ullamcorper nulla non metus auctor fringilla. Vestibulum id ligula porta felis euismod semper. Praesent commodo cursus magna, vel scelerisque nisl consectetur. Fusce dapibus, tellus ac cursus commodo.</p> 
       </div> 
       <div class="col-md-5 col-md-pull-7"> 
        <img class="featurette-image img-responsive center-block" data-src="holder.js/500x500/auto" alt="Generic placeholder image"> 
       </div> 
      </div> 

      <hr class="featurette-divider"> 

      <div class="row featurette"> 
       <div class="col-md-7"> 
        <h2 class="featurette-heading">And lastly, this one. <span class="text-muted">Checkmate.</span></h2> 
        <p class="lead">Donec ullamcorper nulla non metus auctor fringilla. Vestibulum id ligula porta felis euismod semper. Praesent commodo cursus magna, vel scelerisque nisl consectetur. Fusce dapibus, tellus ac cursus commodo.</p> 
       </div> 
       <div class="col-md-5"> 
        <img class="featurette-image img-responsive center-block" data-src="holder.js/500x500/auto" alt="Generic placeholder image"> 
       </div> 
      </div> 

      <hr class="featurette-divider"> 

      <!-- /END THE FEATURETTES --> 


      <!-- FOOTER --> 
      <footer> 
       <p class="pull-right"><a href="#">Back to top</a></p> 
       <p>&copy; 2015 Company, Inc. &middot; <a href="#">Privacy</a> &middot; <a href="#">Terms</a></p> 
      </footer> 

     </div><!-- /.container --> 


     <!-- Bootstrap core JavaScript 
     ================================================== --> 
     <!-- Placed at the end of the document so the pages load faster --> 

     <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script> 
     <script>window.jQuery || document.write('<script src="js/vendor/jquery.min.js"><\/script>')</script> 
     <script src="js/bootstrap.min.js"></script> 
     <!-- IE10 viewport hack for Surface/desktop Windows 8 bug --> 
     <script src="js/ie10-viewport-bug-workaround.js"></script> 


    </body> 
</html> 
+0

wir könnten Ihnen besser helfen, wenn Sie eine Geige erstellen können, um Ihr Problem zu replizieren. – Manish

Antwort

0

Yo haben nicht die Links zu den Skripten (bootstrap.min.js) und CSS (bootstrap.min.css & carousel.css) richtig platziert. Nachfolgend finden Sie Codeausschnitt für Bootstrap-Karussell:

$(function(){ 
 
      $('#myCarousel').carousel(); 
 
     });
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script> 
 

 

 
     <!-- Bootstrap core CSS --> 
 
     <!-- Link to bootstrap.min.css--> 
 
     <link href="http://getbootstrap.com/dist/css/bootstrap.min.css" rel="stylesheet"> 
 

 
     
 
     <!-- Custom styles for this template --> 
 
     <!-- Link to carousel.css --> 
 
     <link href="http://getbootstrap.com/examples/carousel/carousel.css" rel="stylesheet"> 
 

 
<!-- NAVBAR 
 
================================================== --> 
 
    <body> 
 
     <div class="navbar-wrapper"> 
 
      <div class="container"> 
 
       <nav class="navbar navbar-inverse navbar-static-top"> 
 
        <div class="container"> 
 
         <div class="navbar-header"> 
 
          <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false" aria-controls="navbar"> 
 
           <span class="sr-only">Toggle navigation</span> 
 
           <span class="icon-bar"></span> 
 
           <span class="icon-bar"></span> 
 
           <span class="icon-bar"></span> 
 
          </button> 
 
          <a class="navbar-brand" href="#">Project name</a> 
 
         </div> 
 
         <div id="navbar" class="navbar-collapse collapse"> 
 
          <ul class="nav navbar-nav"> 
 
           <li class="active"><a href="#">Home</a></li> 
 
           <li><a href="#about">About</a></li> 
 
           <li><a href="#contact">Contact</a></li> 
 
           <li class="dropdown"> 
 
            <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">Dropdown <span class="caret"></span></a> 
 
            <ul class="dropdown-menu"> 
 
             <li><a href="#">Action</a></li> 
 
             <li><a href="#">Another action</a></li> 
 
             <li><a href="#">Something else here</a></li> 
 
             <li role="separator" class="divider"></li> 
 
             <li class="dropdown-header">Nav header</li> 
 
             <li><a href="#">Separated link</a></li> 
 
             <li><a href="#">One more separated link</a></li> 
 
            </ul> 
 
           </li> 
 
          </ul> 
 
         </div> 
 
        </div> 
 
       </nav> 
 

 
      </div> 
 
     </div> 
 

 
     <!-- Carousel 
 
     ================================================== --> 
 
     <div id="myCarousel" class="carousel slide" data-ride="carousel"> 
 
      <!-- Indicators --> 
 
      <ol class="carousel-indicators"> 
 
       <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" role="listbox"> 
 
       <div class="item active"> 
 
        <img class="first-slide" src="data:image/gif;base64,R0lGODlhAQABAIAAAHd3dwAAACH5BAAAAAAALAAAAAABAAEAAAICRAEAOw==" alt="First slide"> 
 
        <div class="container"> 
 
         <div class="carousel-caption"> 
 
          <h1>Example headline.</h1> 
 
          <p>Note: If you're viewing this page via a <code>file://</code> URL, the "next" and "previous" Glyphicon buttons on the left and right might not load/display properly due to web browser security rules.</p> 
 
          <p><a class="btn btn-lg btn-primary" href="#" role="button">Sign up today</a></p> 
 
         </div> 
 
        </div> 
 
       </div> 
 
       <div class="item"> 
 
        <img class="second-slide" src="data:image/gif;base64,R0lGODlhAQABAIAAAHd3dwAAACH5BAAAAAAALAAAAAABAAEAAAICRAEAOw==" alt="Second slide"> 
 
        <div class="container"> 
 
         <div class="carousel-caption"> 
 
          <h1>Another example headline.</h1> 
 
          <p>Cras justo odio, dapibus ac facilisis in, egestas eget quam. Donec id elit non mi porta gravida at eget metus. Nullam id dolor id nibh ultricies vehicula ut id elit.</p> 
 
          <p><a class="btn btn-lg btn-primary" href="#" role="button">Learn more</a></p> 
 
         </div> 
 
        </div> 
 
       </div> 
 
       <div class="item"> 
 
        <img class="third-slide" src="data:image/gif;base64,R0lGODlhAQABAIAAAHd3dwAAACH5BAAAAAAALAAAAAABAAEAAAICRAEAOw==" alt="Third slide"> 
 
        <div class="container"> 
 
         <div class="carousel-caption"> 
 
          <h1>One more for good measure.</h1> 
 
          <p>Cras justo odio, dapibus ac facilisis in, egestas eget quam. Donec id elit non mi porta gravida at eget metus. Nullam id dolor id nibh ultricies vehicula ut id elit.</p> 
 
          <p><a class="btn btn-lg btn-primary" href="#" role="button">Browse gallery</a></p> 
 
         </div> 
 
        </div> 
 
       </div> 
 
      </div> 
 
      <a class="left carousel-control" href="#myCarousel" 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="#myCarousel" role="button" data-slide="next"> 
 
       <span class="glyphicon glyphicon-chevron-right" aria-hidden="true"></span> 
 
       <span class="sr-only">Next</span> 
 
      </a> 
 
     </div><!-- /.carousel --> 
 

 

 
     <!-- Marketing messaging and featurettes 
 
     ================================================== --> 
 
     <!-- Wrap the rest of the page in another container to center all the content. --> 
 

 
     <div class="container marketing"> 
 

 
      <!-- Three columns of text below the carousel --> 
 
      <div class="row"> 
 
       <div class="col-lg-4"> 
 
        <img class="img-circle" src="data:image/gif;base64,R0lGODlhAQABAIAAAHd3dwAAACH5BAAAAAAALAAAAAABAAEAAAICRAEAOw==" alt="Generic placeholder image" width="140" height="140"> 
 
        <h2>Heading</h2> 
 
        <p>Donec sed odio dui. Etiam porta sem malesuada magna mollis euismod. Nullam id dolor id nibh ultricies vehicula ut id elit. Morbi leo risus, porta ac consectetur ac, vestibulum at eros. Praesent commodo cursus magna.</p> 
 
        <p><a class="btn btn-default" href="#" role="button">View details &raquo;</a></p> 
 
       </div><!-- /.col-lg-4 --> 
 
       <div class="col-lg-4"> 
 
        <img class="img-circle" src="data:image/gif;base64,R0lGODlhAQABAIAAAHd3dwAAACH5BAAAAAAALAAAAAABAAEAAAICRAEAOw==" alt="Generic placeholder image" width="140" height="140"> 
 
        <h2>Heading</h2> 
 
        <p>Duis mollis, est non commodo luctus, nisi erat porttitor ligula, eget lacinia odio sem nec elit. Cras mattis consectetur purus sit amet fermentum. Fusce dapibus, tellus ac cursus commodo, tortor mauris condimentum nibh.</p> 
 
        <p><a class="btn btn-default" href="#" role="button">View details &raquo;</a></p> 
 
       </div><!-- /.col-lg-4 --> 
 
       <div class="col-lg-4"> 
 
        <img class="img-circle" src="data:image/gif;base64,R0lGODlhAQABAIAAAHd3dwAAACH5BAAAAAAALAAAAAABAAEAAAICRAEAOw==" alt="Generic placeholder image" width="140" height="140"> 
 
        <h2>Heading</h2> 
 
        <p>Donec sed odio dui. Cras justo odio, dapibus ac facilisis in, egestas eget quam. Vestibulum id ligula porta felis euismod semper. Fusce dapibus, tellus ac cursus commodo, tortor mauris condimentum nibh, ut fermentum massa justo sit amet risus.</p> 
 
        <p><a class="btn btn-default" href="#" role="button">View details &raquo;</a></p> 
 
       </div><!-- /.col-lg-4 --> 
 
      </div><!-- /.row --> 
 

 

 
      <!-- START THE FEATURETTES --> 
 

 
      <hr class="featurette-divider"> 
 

 
      <div class="row featurette"> 
 
       <div class="col-md-7"> 
 
        <h2 class="featurette-heading">First featurette heading. <span class="text-muted">It'll blow your mind.</span></h2> 
 
        <p class="lead">Donec ullamcorper nulla non metus auctor fringilla. Vestibulum id ligula porta felis euismod semper. Praesent commodo cursus magna, vel scelerisque nisl consectetur. Fusce dapibus, tellus ac cursus commodo.</p> 
 
       </div> 
 
       <div class="col-md-5"> 
 
        <img class="featurette-image img-responsive center-block" data-src="holder.js/500x500/auto" alt="Generic placeholder image"> 
 
       </div> 
 
      </div> 
 

 
      <hr class="featurette-divider"> 
 

 
      <div class="row featurette"> 
 
       <div class="col-md-7 col-md-push-5"> 
 
        <h2 class="featurette-heading">Oh yeah, it's that good. <span class="text-muted">See for yourself.</span></h2> 
 
        <p class="lead">Donec ullamcorper nulla non metus auctor fringilla. Vestibulum id ligula porta felis euismod semper. Praesent commodo cursus magna, vel scelerisque nisl consectetur. Fusce dapibus, tellus ac cursus commodo.</p> 
 
       </div> 
 
       <div class="col-md-5 col-md-pull-7"> 
 
        <img class="featurette-image img-responsive center-block" data-src="holder.js/500x500/auto" alt="Generic placeholder image"> 
 
       </div> 
 
      </div> 
 

 
      <hr class="featurette-divider"> 
 

 
      <div class="row featurette"> 
 
       <div class="col-md-7"> 
 
        <h2 class="featurette-heading">And lastly, this one. <span class="text-muted">Checkmate.</span></h2> 
 
        <p class="lead">Donec ullamcorper nulla non metus auctor fringilla. Vestibulum id ligula porta felis euismod semper. Praesent commodo cursus magna, vel scelerisque nisl consectetur. Fusce dapibus, tellus ac cursus commodo.</p> 
 
       </div> 
 
       <div class="col-md-5"> 
 
        <img class="featurette-image img-responsive center-block" data-src="holder.js/500x500/auto" alt="Generic placeholder image"> 
 
       </div> 
 
      </div> 
 

 
      <hr class="featurette-divider"> 
 

 
      <!-- /END THE FEATURETTES --> 
 

 

 
      <!-- FOOTER --> 
 
      <footer> 
 
       <p class="pull-right"><a href="#">Back to top</a></p> 
 
       <p>&copy; 2015 Company, Inc. &middot; <a href="#">Privacy</a> &middot; <a href="#">Terms</a></p> 
 
      </footer> 
 

 
     </div><!-- /.container --> 
 

 

 
     <!-- Bootstrap core JavaScript 
 
     ================================================== --> 
 
     <!-- Placed at the end of the document so the pages load faster --> 
 

 
     <!-- Link to bootstrap.min.js --> 
 
     <script src="http://getbootstrap.com/dist/js/bootstrap.min.js"></script> 
 
     <!-- IE10 viewport hack for Surface/desktop Windows 8 bug --> 
 
     <script src="js/ie10-viewport-bug-workaround.js"></script> 
 

 

 
    </body> 
 
</html>

+0

Yup, Sie sind richtig. Ich habe meine karussell.css falsch platziert. Vielen Dank!! – dtsui

0

Sie sollten es nicht brauchen, wenn Sie das data-ride Attribut verwendet haben. Ich habe das Gefühl, dass Sie das Javascript in Ihrem HTML nicht korrekt referenziert haben. Stellen Sie sicher, dass in Ihrer Browser-Konsole keine Netzwerkfehler vorliegen und dass Ihre Ressourcen geladen wurden.

Außerdem rufen Sie Ihr Skript auf, bevor Sie jquery und bootstrap.js geladen haben.

Verschieben Sie Ihr Skript, um Ihr Karussell kurz vor dem schließenden </body>-Tag zu initialisieren.

... 
    <script> 
     $(function(){ 
     $('#myCarousel').carousel(); 
     }); 
    </script> 
    </body> 
</html> 

Bootstraps Dokumentation besagt, dass Sie eine Methode oder das andere zu wählen, also entweder Javascript verwenden das Karussell oder die Daten-ride-Attribut auf initalise, aber nicht beides.

Das Attribut data-ride = "Karussell" wird verwendet, um ein Karussell als Animation beginnend beim Laden der Seite zu markieren. Es kann nicht in Kombination mit (redundant und unnötig) explizite JavaScript-Initialisierung der gleichen Karussell verwendet werden.

+0

Sie haben Recht. Es stellte sich heraus, dass ich vergessen habe, den Pfad für meine "carousel.css" zu "css/carousel.css" zu ändern ... Ich habe das kleine Skript weggenommen, das manuell Karussell aufruft und alles funktioniert immer noch gut. Vielen Dank!! – dtsui