当前位置:   article > 正文

web前端-boostrap图片轮播

web前端-boostrap图片轮播

 

  1. <!doctype html>
  2. <html lang="zh-cn">
  3. <head>
  4. <meta charset="UTF-8" />
  5. <meta name="viewport" content="width=device-width, initial-scale=1.0">
  6. <title>轮播</title>
  7. <link href="bootstrap-3.3.5-dist/css/bootstrap.min.css" rel="stylesheet">
  8. <script type="text/javascript" src="jquery-1.10.2.min.js"></script>
  9. <script type="text/javascript" src="bootstrap-3.3.5-dist/js/bootstrap.min.js"></script>
  10. <style>
  11. *{
  12. margin:0;
  13. padding:0;
  14. }
  15. #myCarousel{
  16. width:800px;
  17. height:400px;
  18. margin:200px auto;
  19. }
  20. a{
  21. font-size:60px;
  22. font-weight:bold;
  23. }
  24. </style>
  25. </head>
  26. <body>
  27. <div id="myCarousel" class="carousel slide">
  28. <ol class="carousel-indicators">
  29. <li data-target="#myCarousel" data-slide-to="0" class="active"></li>
  30. <li data-target="#myCarousel" data-slide-to="1"></li>
  31. <li data-target="#myCarousel" data-slide-to="2"></li>
  32. </ol>
  33. <!-- Carousel items -->
  34. <div class="carousel-inner">
  35. <div class="active item"><img src="1.jpg"></div>
  36. <div class="item"><img src="2.jpg"></div>
  37. <div class="item"><img src="3.jpg"></div>
  38. </div>
  39. <!-- Carousel nav -->
  40. <a class="left carousel-control" href="#myCarousel" role="button" data-slide="prev">
  41. <span class="glyphicon glyphicon-chevron-left" aria-hidden="true"></span>
  42. <span class="sr-only">Previous</span>
  43. </a>
  44. <a class="right carousel-control" href="#myCarousel" role="button" data-slide="next">
  45. <span class="glyphicon glyphicon-chevron-right" aria-hidden="true"></span>
  46. <span class="sr-only">Next</span>
  47. </a>
  48. </div>
  49. </body>
  50. </html>

 

 

 

声明:本文内容由网友自发贡献,转载请注明出处:【wpsshop博客】
推荐阅读
相关标签
  

闽ICP备14008679号