Bootstrap3轮播

bootstrap 专栏收录该内容
3 篇文章 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>


  • 2
    点赞
  • 0
    评论
  • 0
    收藏
  • 一键三连
    一键三连
  • 扫一扫,分享海报

©️2021 CSDN 皮肤主题: 大白 设计师:CSDN官方博客 返回首页
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值