发布于 2017-06-20 13:18:26 | 137 次阅读 | 评论: 0 | 来源: 网友投递

这里有新鲜出炉的Bootstrap v3教程,程序狗速度看过来!

Bootstrap Web前端CSS框架

Bootstrap是Twitter推出的一个开源的用于前端开发的工具包。它由Twitter的设计师Mark Otto和Jacob Thornton合作开发,是一个CSS/HTML框架。Bootstrap提供了优雅的HTML和CSS规范,它即是由动态CSS语言Less写成。Bootstrap一经推出后颇受欢迎,一直是GitHub上的热门开源项目,包括NASA的MSNBC(微软全国广播公司)的Breaking News都使用了该项目。


这篇文章主要为大家详细介绍了Bootstrap轮播图学习使用的相关资料,具有一定的参考价值,感兴趣的小伙伴们可以参考一下

本文实例为大家分享了Bootstrap轮播图的具体代码,供大家参考,具体内容如下


<!doctype html>
<html>
  <head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <title></title>
    <link rel="stylesheet" href="css/bootstrap.css" rel="external nofollow" />
    <style>
      #pic{
        width:900px;
        margin:0 auto;
      }
      .carousel-caption{
        color:#f00;
      }
    </style>
  </head>
  <body>
    <!--carousel中文译为轮播,旋转木马 slide给图片添加运动效果; 
      data-interval是间隔时间,不能低于400否则易出问题,单位为ms即毫秒; 
      data-ride="carousel为页面一加载就开始轮播图片
      carousel-caption是在图片上放置文字-->
    <div class="container">
      <div id="pic" class="carousel slide" data-interval="2000" data-ride="carousel">
        <!--小圆点-->
        <ol class="carousel-indicators">
          <li class="active"></li>
          <li></li>
          <li></li>
          <li></li>
        </ol>
        <!--轮播的图片-->
        <div class="carousel-inner">
          <div class="item active">
            <img src="images/1.jpg"/>  
            <div class="carousel-caption">
              <h4>标题1</h4>
              <p>xxxxxxxxxxxxxxxxxxxx</p>
            </div>
          </div>
          <div class="item">
            <img src="images/2.jpg"/>
            <div class="carousel-caption">
              <h4>标题2</h4>
              <p>xxxxxxxxxxxxxxxxxxxx</p>
            </div>   
          </div>
          <div class="item">
            <img src="images/3.jpg"/>
            <div class="carousel-caption">
              <h4>标题3</h4>
              <p>xxxxxxxxxxxxxxxxxxxx</p>
            </div>   
          </div>
          <div class="item">
            <img src="images/4.jpg"/>
            <div class="carousel-caption">
              <h4>标题4</h4>
              <p>xxxxxxxxxxxxxxxxxxxx</p>
            </div>   
          </div>
        </div>
        <!--左右按钮-->
          <a href="#pic" rel="external nofollow" rel="external nofollow" class="carousel-control left" data-slide="prev">‹</a>
          <a href="#pic" rel="external nofollow" rel="external nofollow" class="carousel-control right" data-slide="next">›</a>
      </div>
    </div>
    <script src="js/jquery-2.1.0.js"></script>
    <script src="js/bootstrap.js"></script>
  </body>
</html>

Bootstrap轮播图的效果:

以上就是本文的全部内容,希望对大家的学习有所帮助,也希望大家多多支持phperz。



最新网友评论  共有(0)条评论 发布评论 返回顶部

Copyright © 2007-2017 PHPERZ.COM All Rights Reserved   冀ICP备14009818号  版权声明  广告服务