Carousel-js轮播图片

查看官方文档来实现

<div id="carousel-example-generic" class="carousel slide" data-ride="carousel">
        <!-- Indicators -->
        <ol class="carousel-indicators">
            <li data-target="#carousel-example-generic" data-slide-to="0" class="active"></li>
            <li data-target="#carousel-example-generic" data-slide-to="1"></li>
            <li data-target="#carousel-example-generic" data-slide-to="2"></li>
        </ol>
        
        <!-- Wrapper for slides -->
        <div class="carousel-inner" role="listbox">
            <div class="item active">
              <img src="http://img.mukewang.com/5412ad400001e52014280484.jpg" alt="好的平板就有好的功效">
              <div class="carousel-caption">
                  11 英寸 MacBook Air 充电一次可运行长达 9 小时,而 13 英寸机型则可运行长达 12 小时。
              </div>
            </div>
            <div class="item">
              <img src="http://img.mukewang.com/5412ad7c0001d2eb10880541.jpg" alt="完美平板">
              <div class="carousel-caption">
                  无论是什么任务,配备 Intel HD Graphics 5000 图形处理器的第四代 Intel Core 处理器都能应对自如。
              </div>
            </div>
            <div class="item">
              <img src="http://img.mukewang.com/5412ae5c0001653b12800644.jpg" alt="Mac完美无限">
              <div class="carousel-caption">
                  有了新一代 802.11ac 技术,MacBook Air 令 Wi-Fi 速度超越极限。
              </div>
            </div>
        </div>
        
        <!-- Controls -->
        <a class="left carousel-control" href="#carousel-example-generic" 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="#carousel-example-generic" role="button" data-slide="next">
        <span class="glyphicon glyphicon-chevron-right" aria-hidden="true"></span>
        <span class="sr-only">Next</span>
        </a>
    </div>

posted @ 2014-12-09 17:05  第九剑  阅读(381)  评论(0编辑  收藏  举报