Bootstrap图片轮播
发布时间:2020-12-17 21:01:12 所属栏目:安全 来源:网络整理
导读:Bootstrap提供了carousel插件,实现图片轮播非常方便。 代码 !DOCTYPE html html lang = "en" head meta charset = "UTF-8" title Document / title link href = "http://libs.baidu.com/bootstrap/3.0.3/css/bootstrap.min.css" rel = "stylesheet" script
Bootstrap提供了carousel插件,实现图片轮播非常方便。 代码<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Document</title>
<link href="http://libs.baidu.com/bootstrap/3.0.3/css/bootstrap.min.css" rel="stylesheet">
<script src="http://libs.baidu.com/jquery/2.0.0/jquery.min.js"></script>
<script src="http://libs.baidu.com/bootstrap/3.0.3/js/bootstrap.min.js"></script>
<style type="text/css"> img{ margin:0 auto; } </style>
</head>
<body>
<div id="carousel-example-generic" class="carousel slide" data-ride="carousel">
<!-- Indicators -->
<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>
<!-- Wrapper for slides -->
<div class="carousel-inner" role="listbox">
<div class="item active">
<img src="images/lunbo1.jpg" height="266" width="800" alt="...">
<div class="carousel-caption">
...
</div>
</div>
<div class="item">
<img src="images/lunbo2.jpg" height="266" width="800" alt="...">
<div class="carousel-caption">
...
</div>
</div>
<div class="item">
<img src="images/lunbo3.jpg" height="266" width="800" alt="...">
<div class="carousel-caption">
...
</div>
</div>
...
</div>
<!-- Controls -->
<a class="left carousel-control" href="#carousel-example-generic" role="button" data-slide="prev">
<span class="glyphicon glyphicon-chevron-left" aria-hidden="true"></span>
<span class="sr-only">Previous</span>
</a>
<a class="right carousel-control" href="#carousel-example-generic" role="button" data-slide="next">
<span class="glyphicon glyphicon-chevron-right" aria-hidden="true"></span>
<span class="sr-only">Next</span>
</a>
</div>
</body>
</html>
效果可选参数
<div class="carousel-caption">
<h3>果壳推书正式上线</h3>
<p>好书分享、经验交流</p>
</div>
官网:http://v3.bootcss.com/javascript/#carousel (编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |
相关内容
- angularjs – 带后端api的webpack-dev-server
- bootstrap学习——javascript插件篇
- 如何在scala中从类型安全配置构建映射列表的映射
- bootstrap-daterangepicker 双日历控件
- angularJS+requireJS实现controller及directive的按需加载
- angularjs – 如何在ngtable(angular plugin)中设置动态数据
- 从angular2模板调用静态函数
- 彻底理解webservice SOAP WSDL
- bootstrapv3版本禁用自适应…
- angularjs – Angular-UI-Bootstrap自定义工具提示/弹出窗口