关闭

Bootstrap3轮播

1433人阅读 评论(0) 收藏 举报
分类:

和bs2是同样的,改css的时候才发现bs2和3的栅格类名是不一样的- -,害我以为写错了。

<!doctype html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>bootstrap3</title>
	<link rel="stylesheet" type="text/css" href="css/bootstrap.min.css"/>
	<script type="text/javascript" src="js/bootstrap.min.js"></script>
	<script type="text/javascript" src="js/jquery-1.7.1.min.js"></script>
	<script type="text/javascript" src="js/bootstrap-carousel.js"></script>
	<script type="text/javascript">
	$('.carousel').carousel({
 		 interval: 2000;
	})
	</script>
</head>

<body>
<div class="row">
<div class="col-md-3">

	<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="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>

  <div class="carousel-inner">    
   <div class="item active">
	 <img src="http://www.uiimg.com/data/attachment/forum/201211/02/09374758vxmmlbqv84o424.png" alt="...">
   <div class="carousel-caption">
    <h3>平面设计</h3>
    <p>介绍</p>
 	</div>
	</div>

	<div class="item">
	 <img src="http://www.uiimg.com/data/attachment/forum/201211/02/09374758vxmmlbqv84o424.png" alt="...">
   <div class="carousel-caption">
    <h3>平面设计2</h3>
    <p>介绍2</p>
 	</div>
	</div>

	<div class="item">
	 <img src="http://www.uiimg.com/data/attachment/forum/201211/02/09374758vxmmlbqv84o424.png" alt="...">
   <div class="carousel-caption">
    <h3>平面设计3</h3>
    <p>介绍3</p>
 	</div>
	</div>

  </div>

  <a class="left carousel-control" href="#carousel-example-generic" data-slide="prev">
    <span class="glyphicon glyphicon-chevron-left"></span>
  </a>
  <a class="right carousel-control" href="#carousel-example-generic" data-slide="next">
    <span class="glyphicon glyphicon-chevron-right"></span>
  </a>
</div>

</div>
</div>
</body>
</html>


0
0

查看评论
* 以上用户言论只代表其个人观点,不代表CSDN网站的观点或立场
    个人资料
    • 访问:113804次
    • 积分:1991
    • 等级:
    • 排名:千里之外
    • 原创:88篇
    • 转载:16篇
    • 译文:0篇
    • 评论:13条
    最新评论