通过BootStrap实现轮播图的实际应用
网络编程 2021-07-04 20:00www.168986.cn编程入门
js我们没有学过,今天我是用bootstrap实现轮播图的效果,非常不错代码简单易懂,需要的朋友参考下吧
我是用bootstrap来做的很简单
直接把那坨代码复制到 webstorm里面
狼蚁网站SEO优化我会用我的某一次作业 来做实际解释里面的某部分各代表什么意思
(由于这个代码到底什么意思 老师没有教过 我自行理解 有错的地方 望海涵)
“男友秋装上新”这个地方 就是个轮播 一共3个小点 也就是三张图 可通过左右的箭头 左右翻动
接下来 奉上源代码:并在代码后给各部分做出解释
<div class="col-md-9 lunbo"> <div id="carousel-example-generic" class="carousel slide" data-ride="carousel" style="margin-: 1.4285rem"> <!-- Indicators --> <ol class="carousel-indicators" style="margin-left: -20rem"> <li data-target="#carousel-example-generic" data-slide-to="0" class="active"> </li> 这里规定播放顺序 3个li代表3个小点 点一个小点 就是一张图 <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"> 这里是要播放的图 3张 <div class="item active">这里的active 对应上面active的那个小圆点 <img src="三组项目/PC/PC首页/lunbo1.jpg" alt="..." style="width: 64rem;height: 31.9285rem"> <div class="carousel-caption"></div> </div> <div class="item"> <img src="三组项目/PC/PC首页/lunbo2.jpg" alt="..."style="width: 64rem;height: 31.9285rem"> <div class="carousel-caption"></div> </div> <div class="item"> <img src="三组项目/PC/PC首页/lunbo3.jpg" alt="..."style="width: 64rem;height: 31.9285rem"> <div class="carousel-caption"></div> </div> </div> <!-- Controls --> 这里就是那左右两个箭头 <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>
如果只需两个图 那么就自己改代码 删除一个图片 一个圆点 并改好圆点那里
data-slide-to="0" 里面的数字 这里的0 只是举例数字 具体情况 自行判断
以上所述是长沙网络推广给大家介绍的通过BootStrap实现轮播图的实际应用,希望对大家有所帮助,如果大家有任何疑问欢迎给我留言,长沙网络推广会及时回复大家的!
编程语言
- 机械手焊接机器人编程 机械手焊接设备编程
- vb数据库编程实例,vb做数据库
- tiobe世界编程语言排行榜,全球编程语言排行
- 成都java编程培训 成都it编程培训中心
- 编程基础培训,编程基础知识培训
- flash游戏编程基础教程,flash游戏开发教程
- 不会英语能学编程吗 不会英语可以学程序员吗
- 爱心代码编程C语言 爱心代码编程c语言公式
- c语言编程学习入门 c语言编程快速入门
- 西门子plc编程培训 西门子plc编程培训班
- 哪里可以学编程 台州哪里可以学编程
- 少儿编程哪个好 少儿编程哪个品牌好
- 编程是什么意思,图形编程是什么意思
- c语言编程软件下载,c语言编程软件在哪下载
- java编程软件下载,java编程下载手机版
- ug编程培训学校,ug编程培训教程