轮播请查看下面演示样例。基本已经涵盖最经常使用的一个轮播

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width,initial-scale=1">
<title>js插件_轮播</title>
<link rel="stylesheet" href="css/bootstrap.min.css" type="text/css">
<!--<link rel="stylesheet" href="//cdn.bootcss.com/bootstrap/3.3.5/css/bootstrap.min.css">-->
<script src="js/jquery-1.11.1.min.js"></script>
<script src="js/bootstrap.min.js"></script>
<style type="text/css">
.myCarousel{
width:50%;
}
</style>
</head>
<body>
<div class="container myCarousel">
<div id="carousel-example-generic" class="carousel slide">
<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="images/1.jpg"/>
<div class="carousel-caption">
<h3>宅男女神1</h3>
<p>人气偶像票选890张</p>
</div>
</div>
<div class="item">
<img src="images/2.jpg"/>
<div class="carousel-caption">
<h3>宅男女神2</h3>
<p>人气偶像票选1234张</p>
</div>
</div>
<div class="item">
<img src="images/3.jpg"/>
<div class="carousel-caption">
<h3>宅男女神3</h3>
<p>人气偶像票选7836张</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>
<script>
//设置图片切换时间,默认是5秒;
$(".carousel").carousel({
interval:2000
})
</script> </body>
</html>

Bootstrap的js插件之轮播(carousel)的更多相关文章

  1. Bootstrap 历练实例-轮播(carousel)插件的事件

    事件 下表列出了轮播(Carousel)插件中要用到的事件.这些事件可在函数中当钩子使用. 事件 描述 实例 slide.bs.carousel 当调用 slide 实例方法时立即触发该事件. $(' ...

  2. Bootstrap 历练实例-轮播(carousel)插件方法

    方法 下面是一些轮播(Carousel)插件中有用的方法: 方法 描述 实例 .carousel(options) 初始化轮播为可选的 options 对象,并开始循环项目. $('#identifi ...

  3. Bootstrap 轮播(Carousel)插件

    轮播插件是一种灵活的响应式的向站点添加滑块的方式.除此之外,内容也是非常灵活的.可是图像,内嵌框架,视频或者其它您想的放置任何内容的类型. 下面是一个简单的幻灯片,使用轮播(carousel)插件显示 ...

  4. Bootstrap历练实例:轮播(carousel)

    <!DOCTYPE html><html><head><meta http-equiv="Content-Type" content=&q ...

  5. 《玩转Bootstrap(JS插件篇)》笔记

    导入JavaScript插件 不论是单独导入还一次性导入之前必须先导入jQuery库. 一次性导入 <script src="js/bootstrap.min.js"> ...

  6. 使用bootstrap的JS插件实现模态框效果

    在上一篇文章中,我们使用 js+css 实现了模态框效果,在理解了模态框的基本实现方法和实现效果后,我们就要寻找更快捷的方法,又快又好的来完成模态框开发需求,从而节约时间,提高效率.一个好的轮子,不仅 ...

  7. 玩转Bootstrap(JS插件篇)-第1章 模态弹出框 :1-1导入JavaScript插件

    导入JavaScript插件 Bootstrap除了包含丰富的Web组件之外,如前面介绍的下拉菜单.按钮组.导航.分页等.他还包括一些JavaScript的插件. Bootstrap的JavaScri ...

  8. 用jQuery基于原生js封装的轮播

    我发现轮播在很多网站里面都用到过,一个绚丽的轮播可以为网页增色不少,最近闲来无事,也用原生js封装了一个轮播,可能不像网上的插件那么炫,但是也有用心去做.主要用了闭包的思想.需要传递的参数有:图片地址 ...

  9. 第二百五十一节,Bootstrap项目实战--响应式轮播图

    Bootstrap项目实战--响应式轮播图 学习要点: 1.响应式轮播图 本节课我们要在导航条的下方做一张轮播图,自动播放最新的重要动态. 一.响应式轮播图 响应式轮播图 第一步,设置轮播器区域car ...

随机推荐

  1. 设计模式之过滤器模式(php实现)

    /** * github地址:https://github.com/ZQCard/design_pattern * 过滤器模式(Filter Pattern)或标准模式(Criteria Patter ...

  2. MySQL MID()函数用法

    SQL MID() 函数用于得到一个字符串的一部分.这个函数被MySQL支持,但不被MS SQL Server和Oracle支持.在SQL Server, Oracle 数据库中,我们可以使用 SQL ...

  3. WEB接口测试之Jmeter接口测试自动化 (三)(数据驱动测试) 接口测试与数据驱动

    转载:http://www.cnblogs.com/chengtch/p/6576117.html 1简介 数据驱动测试,即是分离测试逻辑与测试数据,通过如excel表格的形式来保存测试数据,用测试脚 ...

  4. react-native ListView 封装 实现 下拉刷新/上拉加载更多

    1.PageListView 组件封装 src/components/PageListView/index.js /** * 上拉刷新/下拉加载更多 组件 */ import React, { Com ...

  5. 【VBA】获取Excle的安装路径

    在VBA中,如何获取Excle的安装路径呢?请看以下代码: Sub 获取Excle的安装路径() MsgBox "Excle的安装路径为:" & Application.P ...

  6. 【LeetCode】LeetCode——第14题:Longest Common Prefix

    14. Longest Common Prefix My Submissions Question Editorial Solution Total Accepted: 97052 Total Sub ...

  7. 优化MyDb

    import pymysqlclass MyDb(object): #新式类 def __del__(self):#析构函数 self.cur.close() self.coon.close() pr ...

  8. oracle字符串处理函数

    1.LOWER(string) 将输入的字符串转换成小写: 2.UPPER(string) 将输入的字符串转换成大写: 3.INITCAP(string) 将输入的字符串单词的首字母转换成大写(如果不 ...

  9. linux常用命令(个人学习笔记)

    个人说明:学习linux也有半年左右的时间了,从一开始的只会简单的开关机,到现在的熟悉应用一些简单的命令,还是有些进步的,不过对于我这种菜鸟来说,如果不经常用,发现忘的很快.所以就把在学习过程中遇到的 ...

  10. vs无法引用项目问题

    vs无法引用项目问题 2017年12月13日 14:45:31 阅读数:582 开发时编译报错--项目A未被引用,展开项目的引用,发现该项目实质已经被引用了,但是该引用上有个黄色三角感叹号,遂移除该引 ...