Bootstrap 怎么安装?and图片轮播

本文介绍了Bootstrap的安装方法,特别适合前端开发新手。强调Bootstrap不需要通过开发工具导入,使用Sublime等前端编辑器即可直接编辑页面。同时,文章还讲解了如何实现一个简单的图片轮播效果。
摘要由CSDN通过智能技术生成

是的,我最初一直在百度这个问题,作为一只小白,分不清前端后台的框架,执着的以为bootstrap也可以导进类似myeclipse之类的开发工具里面


事实上,只需要一个sublime或者其他前端开发工具就可以直接编辑页面,蠢货蠢货。。。。


【实现一个简单的图片轮播】

 <!DOCTYPE html>
 <html>
 <head>
 <meta charset="utf-8">
 <title>Bootstrap 实例 - 简单的轮播(Carousel)插件</title>
  
 <!-- 引入 Bootstrap -->
 <link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet">
  
 <link rel="stylesheet" href="http://cdn.static.runoob.com/libs/bootstrap/3.3.7/css/bootstrap.min.css">
 <script src="http://cdn.static.runoob.com/libs/jquery/2.1.1/jquery.min.js"></script>
 <script src="http://cdn.static.runoob.com/libs/bootstrap/3.3.7/js/bootstrap.min.js"></script>
 <script>
 $(document).ready(function(){
 $('.circleContent').carousel({interval:1000});//每隔1秒自动轮播
 });
 </script>
 </head>
 <body>
  
  
 <div class="post">
 <!-- /.user-block -->
 <div class="row margin-bottom" style="margin-top: 30px">
 <div class="col-sm-6">
 <!--<img class="img-responsive" src="dist/img/photo1.png" alt="Photo">-->
 <div class="row">
 <!-- /.col -->
 <div class="col-md-12" style="margin-top: 20px">
 <div class="box box-solid">
 <!-- /.box-header -->
 <div class="box-body">
 <div id="carousel-example-generic" class="carousel slide" data-ride="carousel">
 <ol class="carousel-indicators">
 <li data-target="#carousel-example-generic" data-slide-to="0" class=""></li>
 <li data-target="#carousel-example-generic" data-slide-to="1" class=""></li>
 <li data-target="#carousel-example-generic" data-slide-to="2" class="active"></li>
 </ol>
 <div class="carousel-inner">
 <div class="item">
 <img src="http://placehold.it/900x500/39CCCC/ffffff&amp;text=I+Love+Bootstrap" alt="First slide">
 <div class="carousel-caption">
 First Slide
 </div>
 </div>
 <div class="item">
 <img src="http://placehold.it/900x500/3c8dbc/ffffff&amp;text=I+Love+Bootstrap" alt="Second slide">
 <div class="carousel-caption">
 Second Slide
 </div>
 </div>
 <div class="item active">
 <img src="http://placehold.it/900x500/f39c12/ffffff&amp;text=I+Love+Bootstrap" alt="Third slide">
  
 <div class="carousel-caption">
 Third Slide
 </div>
 </div>
 </div>
 <!--
 <a class="left carousel-control" href="#carousel-example-generic" data-slide="prev">
 <span class="fa fa-angle-left"></span>
 </a>
 <a class="right carousel-control" href="#carousel-example-generic" data-slide="next">
 <span class="fa fa-angle-right"></span>
 </a>
 -->
 </div>
 </div>
 <!-- /.box-body -->
 </div>
 <!-- /.box -->
 </div>
 <!-- /.col -->
 </div>
 <!-- /.row -->
 <!-- END ACCORDION & CAROUSEL-->
 </div>
 <!-- /.col -->
  
 </div>
 <!-- /.row -->
 </div>
  
  
  
  
  
  
  
 <!-- jQuery (Bootstrap 的 JavaScript 插件需要引入 jQuery) -->
 <script src="https://code.jquery.com/jquery.js"></script>
 <!-- 包括所有已编译的插件 -->
 <script src="js/bootstrap.min.js"></script>
  
 </body>
 </html>


效果如下:



  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值