是的,我最初一直在百度这个问题,作为一只小白,分不清前端后台的框架,执着的以为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&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&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&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> |
效果如下: