Bootstrap-轮播图-No.4
<!DOCTYPE html>
<html lang="zh">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta http-equiv="X-UA-Compatible" content="ie=edge" />
<title>Document</title>
<link rel="stylesheet" type="text/css" href="../../css/bootstrap.css"/>
<script src="../../js/jquery-1.11.2.min.js" type="text/javascript" charset="utf-8"></script>
<script src="../../js/bootstrap.min.js" type="text/javascript" charset="utf-8"></script>
</head>
<body>
<!--
作者:bilaisheng@163.com
时间:2017-10-16
描述:bootstrap插件 ,由别人定义好jquery插件技术进行开发,插件是没有办法仅通过CSS就能控制
而是通过js/jquery 控制. 必须引入jquery/bootstrap.min.js
增加轮播图正中间小圆点
增加左右两侧箭头
顺序: 小圆点>轮播图片>左右箭头
-->
<style type="text/css">
.mt50{margin-top: 50px;}
.carousel-inner >.item img{width: 100%;height: 300px;}
</style>
<div class="container mt50"><!--viewport视口 1170px-->
<!--在轮播图div中增加id,方便小圆点和左右方向键控制图片-->
<div class="carousel slide" id="carouselbox" data-ride="carousel" data-interval="3000">
<!--轮播图正中间小圆点-->
<ol class="carousel-indicators">
<!--data-target: 控制某个轮播图的图片 . data-slide-to: 第几张. 默认从0开始 -->
<li data-target="#carouselbox" data-slide-to="0" class="active"></li>
<li data-target="#carouselbox" data-slide-to="1" ></li>
<li data-target="#carouselbox" data-slide-to="2" ></li>
</ol>
<!--轮播图片-->
<div class="carousel-inner">
<div class="item active">
<img src="http://img-cdn2.luoo.net/site/201710/59df32615f7cf.jpg"/>
</div>
<div class="item">
<img src="http://img-cdn2.luoo.net/site/201710/59db18dd28759.jpg"/>
</div>
<div class="item">
<img src="http://img-cdn2.luoo.net/site/201710/59ddf17c9ce1e.jpg"/>
</div>
</div>
<!--左右箭头-->
<!--左侧-->
<!--此处href为待控制的div的ID。 注意 ,一定要加#,因为源码是根据js控制的,data-slide:prev 上一张 , next下一张 -->
<a href="#carouselbox" class="left carousel-control" data-slide="prev">
<span class="glyphicon glyphicon-chevron-left"></span>
<span class="sr-only">Previous</span>
</a>
<!--右侧-->
<a href="#carouselbox" class="right carousel-control" data-slide="next">
<span class="glyphicon glyphicon-chevron-right"></span>
<span class="sr-only">Next</span>
</a>
</div>
</div>
</body>
</html>
Bootstrap-轮播图-No.4的更多相关文章
- bootstrap轮播图 两侧半透明阴影
用bootstrap轮播图:Carousel插件,图片两侧影音实在碍眼,想去掉,首先发现有css里由opacity: 0.5这个东西来控制,全部改成opacity: 0.0,发现指示箭头也看不见了. ...
- Bootstrap 轮播图的使用和理解
<!DOCTYPE html> <html lang="zh-CN"> <head> <meta charset="utf-8& ...
- bootstrap轮播图--兼容IE7
<!DOCTYPE html> <html> <head> <title>Bootstrap轮播</title> <meta char ...
- 动态请求数据并放入bootstrap轮播图
下面是前端代码: <!DOCTYPE html> <html> <head> <meta charset="UTF-8"> < ...
- 第124天:移动web端-Bootstrap轮播图插件使用
Bootstrap JS插件使用 > 对于Bootstrap的JS插件,我们只需要将文档实例中的代码粘到我们自己的代码中> 然后作出相应的样式调整 Bootstrap中轮播图插件叫作Car ...
- bootstrap轮播图组件
一.轮播图组件模板(官方文档) <div id="carousel-example-generic" class="carousel slide" dat ...
- bootstrap轮播图
<!doctype html><html><head> <meta charset="utf-8"> <title>使用 ...
- Bootstrap 轮播图(Carousel)插件
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8&quo ...
- bootstrap轮播图不能显示左右箭头
引入font文件夹即可 原文 :http://www.imooc.com/qadetail/64277
- Bootstrap 我的学习记录4 轮播图的使用和理解
<!DOCTYPE html> <html lang="zh-CN"> <head> <meta charset="utf-8& ...
随机推荐
- poj1915(双向bfs)
题目链接:https://vjudge.net/problem/POJ-1915 题意:求棋盘上起点到终点最少的步数. 思路:双向广搜模板题,但玄学的是我的代码G++会wa,C++过了,没找到原因QA ...
- CodeBlocks 配置
CodeBlocks 配置 Code::Blocks 17.12 时间:2019.6 下载网址 http://www.codeblocks.org/downloads/26 ,这里选择的是 mingw ...
- 【思维】ABC
题目描述 You are given a string s consisting of A, B and C.Snuke wants to perform the following operatio ...
- .Net C# RSA签名和验签
帮助类 using System; using System.Text; using System.IO; using System.Security.Cryptography; namespace ...
- Java生成随机数列表
生成随机数列表 1.Java8以前 (1)Math.random private List<UserEntity> random1() { ArrayList<UserEntity& ...
- C#从服务器下载文件的四种方式
//方法一:TransmitFile实现下载 string fileName = "ss.docx"; //客户端预设的文件名,导出时可修改 string filePath = ...
- C# 使用Emit实现动态AOP框架 (三)
目 录 C# 使用Emit实现动态AOP框架 (一) C# 使用Emit实现动态AOP框架 (二) C# 使用Emit实现动态AOP框架 (三) C# 使用Emit实现动态AOP框架 进阶篇之异常处 ...
- vue项目中导出PDF的两种方式
参考大家导出的方式,基本上是如下两种: 1.使用 html2Canvas + jsPDF 导出PDF, 这种方式什么都好,就是下载的pdf太模糊了.对要求好的pdf这种方式真是不行啊! 2.调用浏览器 ...
- 【原创】大叔经验分享(80)openresty(nginx+lua)发邮件
nginx配置 lua_package_path "/usr/local/openresty/lualib/resty/smtp/?.lua;;"; lua_need_reques ...
- LeetCode:627.交换工资
题目链接:https://leetcode-cn.com/problems/swap-salary/ 题目 给定一个 salary 表,如下所示,有 m = 男性 和 f = 女性 的值.交换所有的 ...