fmpq.com
源代码:
点击运行
<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>Bootstrap carousal实例</title> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta name="description" content="Bootstrap 2.0 carousal实例 - fmpq.com"> <!-- Le styles --> <link href="/jscss/bootstrap/v3/bootstrap.css" rel="stylesheet"> <link href="/jscss/bootstrap/v3/example-fixed-layout.css" rel="stylesheet"> <!-- Le HTML5 shim, for IE6-8 support of HTML5 elements --> <!--[if lt IE 9]> <script src="//html5shim.googlecode.com/svn/trunk/html5.js"></script> <![endif]--> <!-- Le fav and touch icons --> <link rel="shortcut icon" href="/images/bootstrap/favicon.ico"> <link rel="apple-touch-icon" href="/images/bootstrap/apple-touch-icon.png"> <link rel="apple-touch-icon" sizes="72x72" href="/images/bootstrap/apple-touch-icon-72x72.png"> <link rel="apple-touch-icon" sizes="114x114" href="/images/bootstrap/apple-touch-icon-114x114.png"> </head> <body> <div class="navbar navbar-fixed-top"> <div class="navbar-inner"> <div class="container"> <a class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse"> <span class="icon-bar"></span> <span class="icon-bar"></span> <span class="icon-bar"></span> </a> <div class="nav-collapse"> <ul class="nav"> <li class="active"><a href="#">Home</a></li> <li><a href="#about">About</a></li> <li><a href="#contact">Contact</a></li> </ul> </div><!--/.nav-collapse --> </div> </div> </div> <div class="container"> <!-- Example row of columns --> <div class="row"> <div class="span4"> <h2>HTML5 and JS Apps</h2> <p> </p> <div id="myCarousel" class="carousel slide"> <!-- Carousel items --> <div class="carousel-inner"> <div class="active item"><img src="/images/bootstrap/html5_logo.png" alt="HTML5 logo" width="500" height="99" /></div> <div class="item"><img src="/images/bootstrap/javascript-logo.png" alt="JS logo" width="500" height="99" /></div> <div class="item"><img src="/images/bootstrap/schema.png" alt="Schema.org logo" width="500" height="99" /></div> <div class="item"><img src="/images/bootstrap/json.gif" alt="JSON logo" width="500" height="99" /></div> </div> <!-- Carousel nav --> <a class="carousel-control left" href="#myCarousel" data-slide="prev">‹</a> <a class="carousel-control right" href="#myCarousel" data-slide="next">›</a> </div> </div> </div> <hr> <footer> <p>© Company 2013</p> </footer> </div> <!-- /container --> <!-- Le javascript ================================================== --> <!-- 放置在文档的页面底部加快加载速度 --> <script src="/jscss/bootstrap/v3/jquery.js"></script> <script src="/jscss/bootstrap/v3/bootstrap-carousel.js"></script> </body> </html>
运行结果