带有底部装载指示的Jquery滑块

时间:2017-04-06 12:17:31

标签: javascript jquery html5 jquery-ui jquery-plugins

我需要为主页创建滑块。请查看以下链接,我需要的相同类型滑块。

示例链接:http://www.apple.com/

请告诉我这个插件的名称,它是开源的吗?

如果您有任何类似的开源插件,请回复我的参考链接。

2 个答案:

答案 0 :(得分:0)

<!DOCTYPE html>
<html lang="en">
<head>
  <title>Bootstrap Example</title>
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
  <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.0/jquery.min.js"></script>
  <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
  <style>
  .carousel-inner > .item > img,
  .carousel-inner > .item > a > img {
      width: 70%;
      margin: auto;
  }
  </style>
</head>
<body>

<div class="container">
  <br>
  <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>
      <li data-target="#myCarousel" data-slide-to="3"></li>
    </ol>

    <!-- Wrapper for slides -->
    <div class="carousel-inner" role="listbox">
      <div class="item active">
        <img src="https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcQv1GBTlzKpCHhhb7cs4BYVUNawMxor-SnyM_u4-CT4Y70k7eKEbLk5h_I" alt="Chania" width="460" height="345">
      </div>

      <div class="item">
        <img src="https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcRp0tRJtlX7OswpSRxKj4mUKxfMxo6Nl1_z5UA4xkHjcS3kI7SCYg" alt="Chania" width="460" height="345">
      </div>
    
      <div class="item">
        <img src="https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcRApv1ONPfZhFsAnXa4xOVJ2oFnj8-w78HCMkaonQ9N05JGsTVo" alt="Flower" width="460" height="345">
      </div>

    
    </div>

    <!-- Left and right controls -->
    <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>
</div>

</body>
</html>

答案 1 :(得分:0)

旧学校Nivo Slider怎么样?它在过去很多年里都创造了奇迹:)