BootStrap 弹出层代码

前端之家收集整理的这篇文章主要介绍了BootStrap 弹出层代码前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。

废话不多说了,直接给大家贴代码了,具体代码如下所示:

<Meta charset="utf-8"> <Meta http-equiv="X-UA-Compatible" content="IE=edge"> <Meta name="viewport" content="width=device-width,initial-scale=1"> Bootstrap@H_<a href="https://www.jb51.cc/tag/403/" target="_blank" class="keywords">403</a>_6@ <link rel="stylesheet" href="css/bootstrap.css" rel="external nofollow" /> </head> <body> <!--注意:1.弹出层必须放在body里 2.弹出层里面不能再嵌套别的层 3.弹出层弹出来以后,页面的滚动条会被覆盖--> <div class="container"> <div class="row"> <button class="btn btn-primary" data-toggle="modal" data-target=".myModal1">弹出一个小层</button><!--data-toggle="modal"给button一个点击事件,弹出一个模态窗口--> <button class="btn btn-primary" data-toggle="modal" data-target=".myModal2">弹出一个大层</button> </div> </div> <div class="modal fade myModal1"><!--modal,弹出层父级,fade使弹出层有一个运动过程--> <div class="modal-dialog"><!--modal-dialog,弹出层--> <div class="modal-content"><!--modal-content,弹出层内容区域--> <div class="modal-header"> <button class="close" data-dismiss="modal">×</button><!--将关闭按钮放在标题前面可以使按钮位于右上角--> <h4>水果摊</h4> </div><!--modal-header,弹出层头部区域--> <div class="modal-body"> <p>苹果葡萄香蕉柿子火龙果便宜卖了,多买优惠更多,还在等什么呢?</p> <p>苹果葡萄香蕉柿子火龙果便宜卖了,多买优惠更多,还在等什么呢?</p> <p>苹果葡萄香蕉柿子火龙果便宜卖了,多买优惠更多,还在等什么呢?</p> </div><!--modal-body,弹出层主体区域--> <div class="modal-footer"> <button class="btn btn-primary" data-dismiss="modal">确定</button><!--data-dismiss="modal"点击按钮之后可以关闭窗口--> </div><!--modal-footer,弹出层底部区域--> </div> </div> </div> <div class="modal myModal2"><!----> <div class="modal-dialog modal-lg"><!--还有modal-sm,modal-md--> <div class="modal-content"> <div class="modal-header"> <button class="close" data-dismiss="modal">×</button> <h4>水果摊</h4> </div> <div class="modal-body"> <p>苹果葡萄香蕉柿子火龙果便宜卖了,多买优惠更多,还在等什么呢?</p> <p>苹果葡萄香蕉柿子火龙果便宜卖了,多买优惠更多,还在等什么呢?</p> <p>苹果葡萄香蕉柿子火龙果便宜卖了,多买优惠更多,还在等什么呢?</p> </div> <div class="modal-footer"> <button class="btn btn-primary" data-dismiss="modal">确定</button> </div> </div> </div> </div> <script src="js/jquery-2.1.0.js"></script> <script src="js/bootstrap.js"></script> </body> </html></pre> </div> <p><p class="pic_center"><img title="" alt="这里写图片描述" src="https://files.jb51.cc/file_images/article/201702/201702091122041.png" /></p></p> <p>以上所述是小编给大家介绍的BootStrap 弹出层<a href="https://www.jb51.cc/tag/daima/" target="_blank" class="keywords">代码</a>。编程之家 jb51.cc 收集整理的教程希望能对你有所帮助,如果觉得编程之家不错,可<a href="https://www.jb51.cc/tag/fenxiang/" target="_blank" class="keywords">分享</a>给好友!感谢<a href="https://www.jb51.cc/tag/zhichi/" target="_blank" class="keywords">支持</a>。</p><i class="glyphicon glyphicon-link"></i> 原文链接:https://www.f2er.com/bootstrap/41866.html</div> <div class="topcard-tags"><a href="https://www.f2er.com/tag/bootstrapdanchuceng/" class="tag_link" target="_blank">bootstrap弹出层</a></div> <ul class="list-group"> <li class="list-group-item"><a href="https://www.f2er.com/bootstrap/41878.html" title="Bootstrap列表组学习使用">上一篇:Bootstrap列表组学习使用</a><a href="https://www.f2er.com/bootstrap/41858.html" title="bootstrapValidator.min.js表单验证插件" class="text-muted pull-right">下一篇:bootstrapValidator.min.js表单验证</a> </li> </ul> </div> </div> </div> <!-- row end --> <div class="row row-sm"> <div class="col-sm-12 col-md-12 col-lg-12"> <div class="card"> <ins class="adsbygoogle" style="display:block" data-ad-format="autorelaxed" data-ad-client="ca-pub-4605373693034661" data-ad-slot="9144498553"></ins> <script> (adsbygoogle = window.adsbygoogle || []).push({}); </script></div> </div> </div> <div class="row row-sm"> <div class="col-sm-12 col-md-12 col-lg-12"> <div class="card"> <div class="title"><h1>猜你在找的Bootstrap相关文章</h1></div> <div class="list_con"> <a href="https://www.f2er.com/bootstrap/997481.html" title="使用BootStrapValidator来完成前端输入验证"><div class="title">使用BootStrapValidator来完成前端输入验证</div> <div class="summary">BootStrapValidator可以用于完成基于BootStrap搭建的前端UI中的输入验证,由于本插件完全基...</div> <time class="summary">作者:前端之家 时间:2021-02-18</time> </a> </div> <div class="list_con"> <a href="https://www.f2er.com/bootstrap/997480.html" title="顶求网首页整体设计思路"><div class="title">顶求网首页整体设计思路</div> <div class="summary">顶求网首页是一个web2.0博客类的网站首页,在该网站中用户可以发表博客,也可以推荐图书给...</div> <time class="summary">作者:前端之家 时间:2021-02-18</time> </a> </div> <div class="list_con"> <a href="https://www.f2er.com/bootstrap/997479.html" title="自己手写简约实用的Jquery tabs插件(基于bootstrap环境)"><div class="title">自己手写简约实用的Jquery tabs插件(基于bootstrap环境)</div> <div class="summary">一直想改版网站首页的图书展示部分,以前的展示是使用BootStrap的传统的collapse,网页篇幅...</div> <time class="summary">作者:前端之家 时间:2021-02-18</time> </a> </div> <div class="list_con"> <a href="https://www.f2er.com/bootstrap/997478.html" title="BootStrap中Affix控件的使用方法及如何保持布局的美观"><div class="title">BootStrap中Affix控件的使用方法及如何保持布局的美观</div> <div class="summary">在视窗足够大的时候是没有任何问题的,但是当拖动改变视窗的大小后会发现布局又变乱了,这...</div> <time class="summary">作者:前端之家 时间:2021-02-18</time> </a> </div> <div class="list_con"> <a href="https://www.f2er.com/bootstrap/997477.html" title="针对BootStrap中tabs控件的美化和完善"><div class="title">针对BootStrap中tabs控件的美化和完善</div> <div class="summary">BootStrap中的tabs控件以其简单易用而很受广大开发者的欢迎。但是,它的样式比较单一,如何...</div> <time class="summary">作者:前端之家 时间:2021-02-18</time> </a> </div> <div style="border-bottom: 1px solid #f4f4f4;margin-top:20px;"> <ins class="adsbygoogle" style="display:block" data-ad-format="fluid" data-ad-layout-key="-fr-2o+fp-dx-wx" data-ad-client="ca-pub-4605373693034661" data-ad-slot="4561116489"></ins> <script> (adsbygoogle = window.adsbygoogle || []).push({}); </script> </div><div class="list_con"> <a href="https://www.f2er.com/bootstrap/997475.html" title="使用BootStrap制作用户登录UI"><div class="title">使用BootStrap制作用户登录UI</div> <div class="summary">先看看劳动成果 布局 左右各一半(col-md-6) 左侧登录框占左侧一半的10/12 右侧是登录系统...</div> <time class="summary">作者:前端之家 时间:2021-02-18</time> </a> </div> <div class="list_con"> <a href="https://www.f2er.com/bootstrap/997474.html" title="打造简单实用的Thinkphp分页样式(Bootstrap版本)"><div class="title">打造简单实用的Thinkphp分页样式(Bootstrap版本)</div> <div class="summary">先吐槽一下ThinkPHP3.1版的分页样式,虽然看起来也很简单大方,但是所有的页码全是使用简单...</div> <time class="summary">作者:前端之家 时间:2021-02-18</time> </a> </div> <div class="list_con"> <a href="https://www.f2er.com/bootstrap/997473.html" title="Bootstrap轮播(carousel)插件中图片变形的终极解决方案——使用jqthumb.js"><div class="title">Bootstrap轮播(carousel)插件中图片变形的终极解决方案——使用jqthumb.js</div> <div class="summary">在顶求网的首页中我使用了BootStrap的轮播(carousel)插件来展示文章中的图片。我在程序中...</div> <time class="summary">作者:前端之家 时间:2021-02-18</time> </a> </div> <div class="list_con"> <a href="https://www.f2er.com/bootstrap/997472.html" title="移动开发中单页异步加载所有列表项"><div class="title">移动开发中单页异步加载所有列表项</div> <div class="summary">在做WEB开发的时候我们经常会遇到分页的处理,如果在PC上显示网页的话,使用传统的分页是可...</div> <time class="summary">作者:前端之家 时间:2021-02-18</time> </a> </div> <div class="list_con"> <a href="https://www.f2er.com/bootstrap/997471.html" title="仿豆瓣分类标签的实现"><div class="title">仿豆瓣分类标签的实现</div> <div class="summary">为了和文章分类部分的样式进行区分,我决定自己动手写一个具有其他样式的分类标签集。刚好...</div> <time class="summary">作者:前端之家 时间:2021-02-18</time> </a> </div> <div style="border-bottom: 1px solid #f4f4f4;margin-top:20px;"> <ins class="adsbygoogle" style="display:block" data-ad-format="fluid" data-ad-layout-key="-fr-2o+fp-dx-wx" data-ad-client="ca-pub-4605373693034661" data-ad-slot="4561116489"></ins> <script> (adsbygoogle = window.adsbygoogle || []).push({}); </script> </div></div> </div> </div> </div> <!-- left end--> <!-- right --> <div class="col-sm-12 col-md-12 col-lg-3"> <!-- row --> <div class="row row-sm"> <div class="col-sm-12 col-md-12 col-lg-12"> <div class="card"> <label class="main-content-label ">编程分类</label> <div class="cate mt-20"><a href="https://www.f2er.com/html/" title="HTML">HTML</a><a href="https://www.f2er.com/html5/" title="HTML5">HTML5</a><a href="https://www.f2er.com/js/" title="JavaScript">JavaScript</a><a href="https://www.f2er.com/css/" title="CSS">CSS</a><a href="https://www.f2er.com/jquery/" title="jQuery">jQuery</a><a href="https://www.f2er.com/bootstrap/" title="Bootstrap">Bootstrap</a><a href="https://www.f2er.com/angularjs/" title="Angularjs">Angularjs</a><a href="https://www.f2er.com/typescript/" title="TypeScript">TypeScript</a><a href="https://www.f2er.com/vue/" title="Vue">Vue</a><a href="https://www.f2er.com/dojo/" title="Dojo">Dojo</a><a href="https://www.f2er.com/json/" title="Json">Json</a><a href="https://www.f2er.com/electron/" title="Electron">Electron</a><a href="https://www.f2er.com/nodejs/" title="Node.js">Node.js</a><a href="https://www.f2er.com/extjs/" title="extjs">extjs</a><a href="https://www.f2er.com/express/" title="Express ">Express </a><a href="https://www.f2er.com/xml/" title="XML">XML</a><a href="https://www.f2er.com/es6/" title="ES6">ES6</a><a href="https://www.f2er.com/ajax/" title="Ajax">Ajax</a><a href="https://www.f2er.com/flash/" title="Flash">Flash</a><a href="https://www.f2er.com/unity/" title="Unity">Unity</a><a href="https://www.f2er.com/react/" title="React">React</a><a href="https://www.f2er.com/flex/" title="Flex">Flex</a><a href="https://www.f2er.com/antdesign/" title="Ant Design">Ant Design</a><a href="https://www.f2er.com/webfrontend/" title="Web前端">Web前端</a><a href="https://www.f2er.com/weapp/" title="微信小程序">微信小程序</a><a href="https://www.f2er.com/wxmp/" title="微信公众号">微信公众号</a><div class="clearfix"></div> </div> </div> </div> </div> <!-- row end --> <!-- row --> <div class="row row-sm"> <div class="col-sm-12 col-md-12 col-lg-12"> <div class="card"> <!-- f2er-rightads --> <ins class="adsbygoogle" style="display:block" data-ad-client="ca-pub-4605373693034661" data-ad-slot="7756441254" data-ad-format="auto" data-full-width-responsive="true"></ins> <script> (adsbygoogle = window.adsbygoogle || []).push({}); </script> </div> </div> </div> <!-- row end --> <!-- row --> <div class="row row-sm"> <div class="col-sm-12 col-md-12 col-lg-12"> <div class="card"> <label class="main-content-label ">最新文章</label> <ul class="n-list"><li><a href="https://www.f2er.com/bootstrap/997481.html" title="使用BootStrapValidator来完成前端输入验证" target="_blank">• 使用BootStrapValidator来</a></li> <li><a href="https://www.f2er.com/bootstrap/997480.html" title="顶求网首页整体设计思路" target="_blank">• 顶求网首页整体设计思路</a></li> <li><a href="https://www.f2er.com/bootstrap/997479.html" title="自己手写简约实用的Jquery tabs插件(基于bootstrap环境)" target="_blank">• 自己手写简约实用的Jquery</a></li> <li><a href="https://www.f2er.com/bootstrap/997478.html" title="BootStrap中Affix控件的使用方法及如何保持布局的美观" target="_blank">• BootStrap中Affix控件的使</a></li> <li><a href="https://www.f2er.com/bootstrap/997477.html" title="针对BootStrap中tabs控件的美化和完善" target="_blank">• 针对BootStrap中tabs控件的</a></li> <li><a href="https://www.f2er.com/bootstrap/997476.html" title="BootStrap简介及应用要点" target="_blank">• BootStrap简介及应用要点</a></li> <li><a href="https://www.f2er.com/bootstrap/997475.html" title="使用BootStrap制作用户登录UI" target="_blank">• 使用BootStrap制作用户登录</a></li> <li><a href="https://www.f2er.com/bootstrap/997474.html" title="打造简单实用的Thinkphp分页样式(Bootstrap版本)" target="_blank">• 打造简单实用的Thinkphp分</a></li> <li><a href="https://www.f2er.com/bootstrap/997473.html" title="Bootstrap轮播(carousel)插件中图片变形的终极解决方案——使用jqthumb.js" target="_blank">• Bootstrap轮播(carousel)</a></li> <li><a href="https://www.f2er.com/bootstrap/997472.html" title="移动开发中单页异步加载所有列表项" target="_blank">• 移动开发中单页异步加载所</a></li> </ul> </div> </div> </div> <!-- row end --> <!-- row --> <div class="row row-sm"> <div class="col-sm-12 col-md-12 col-lg-12"> <div class="card"> <label class="main-content-label ">热门标签 <span class="pull-right tx-12"> <a href="https://www.f2er.com/all" target="_blank">更多 ►</a></span> </label> <div class="topcard-tags"><a href="https://www.f2er.com/tag/guanbiyangao/" title="关闭广告" target="_blank">关闭广告</a><a href="https://www.f2er.com/tag/danduheaders/" title="单独headers" target="_blank">单独headers</a><a href="https://www.f2er.com/tag/fengzhuangdaima/" title="封装代码" target="_blank">封装代码</a><a href="https://www.f2er.com/tag/tishicuowu/" title="提示错误" target="_blank">提示错误</a><a href="https://www.f2er.com/tag/zhengshuzhengze/" title="整数正则" target="_blank">整数正则</a><a href="https://www.f2er.com/tag/fei0kaitou/" title="非0开头" target="_blank">非0开头</a><a href="https://www.f2er.com/tag/tiaoye/" title="跳页" target="_blank">跳页</a><a href="https://www.f2er.com/tag/chuyema/" title="出页码" target="_blank">出页码</a><a href="https://www.f2er.com/tag/antdtable/" title="antd table" target="_blank">antd table</a><a href="https://www.f2er.com/tag/tishiURLweizhuce/" title="提示URL未注册" target="_blank">提示URL未注册</a><a href="https://www.f2er.com/tag/gongzhonghaozhifu/" title="公众号支付" target="_blank">公众号支付</a><a href="https://www.f2er.com/tag/vuehashmoshi/" title="vue hash模式" target="_blank">vue hash模式</a><a href="https://www.f2er.com/tag/iSlider/" title="iSlider" target="_blank">iSlider</a><a href="https://www.f2er.com/tag/chepaijianpan/" title="车牌键盘" target="_blank">车牌键盘</a><a href="https://www.f2er.com/tag/xunhuantupian/" title="循环图片" target="_blank">循环图片</a><a href="https://www.f2er.com/tag/echartsshuangzhexian/" title="echarts 双折线" target="_blank">echarts 双折</a><a href="https://www.f2er.com/tag/zuoyoubuju/" title="左右布局" target="_blank">左右布局</a><a href="https://www.f2er.com/tag/DllPlugin/" title="DllPlugin" target="_blank">DllPlugin</a><a href="https://www.f2er.com/tag/duixiangchuangjian/" title="对象创建" target="_blank">对象创建</a><a href="https://www.f2er.com/tag/daziyouxi/" title="打字游戏" target="_blank">打字游戏</a><a href="https://www.f2er.com/tag/quanxuan/" title="圈选" target="_blank">圈选</a><a href="https://www.f2er.com/tag/lianglan/" title="两栏" target="_blank">两栏</a><a href="https://www.f2er.com/tag/yunhanshu/" title="云函数" target="_blank">云函数</a><a href="https://www.f2er.com/tag/mengban/" title="蒙版" target="_blank">蒙版</a><a href="https://www.f2er.com/tag/ES2020/" title="ES2020" target="_blank">ES2020</a><a href="https://www.f2er.com/tag/chuchuang/" title="橱窗" target="_blank">橱窗</a><a href="https://www.f2er.com/tag/wufenggundonglunbo/" title="无缝滚动轮播" target="_blank">无缝滚动轮播</a><a href="https://www.f2er.com/tag/sekuaipengzhuang/" title="色块碰撞" target="_blank">色块碰撞</a><a href="https://www.f2er.com/tag/zujianxiaohui/" title="组件销毁" target="_blank">组件销毁</a><a href="https://www.f2er.com/tag/wendangcaozuo/" title="文档操作" target="_blank">文档操作</a></div> </div> </div> </div> <!-- row end --> <!-- row --> <div class="row row-sm"> <div class="col-sm-12 col-md-12 col-lg-12"> <div class="card"> <!-- f2er-rightads --> <ins class="adsbygoogle" style="display:block" data-ad-client="ca-pub-4605373693034661" data-ad-slot="7756441254" data-ad-format="auto" data-full-width-responsive="true"></ins> <script> (adsbygoogle = window.adsbygoogle || []).push({}); </script> </div> </div> </div> <!-- row end --> </div> <!-- right end --> </div> </div> <footer id="footer"> <div class="container"> <div class="row hidden-xs"> <dl class="col-sm-6 site-link"> <dt>最近更新</dt><dd><a href="https://www.f2er.com/faq/884225.html" title="jQuery选择伪元素:after" target="_blank">· jQuery选择伪元素:after</a><span class="text-muted pull-right">10-20</span></dd> <dd><a href="https://www.f2er.com/faq/884224.html" title="JavaScript随机颜色生成器" target="_blank">· JavaScript随机颜色生成器</a><span class="text-muted pull-right">10-20</span></dd> <dd><a href="https://www.f2er.com/faq/884223.html" title="JavaScript指数" target="_blank">· JavaScript指数</a><span class="text-muted pull-right">10-20</span></dd> <dd><a href="https://www.f2er.com/faq/884222.html" title="addResourceHandlers无法解析静态资源" target="_blank">· addResourceHandlers无法解析静态资源</a><span class="text-muted pull-right">10-20</span></dd> <dd><a href="https://www.f2er.com/faq/884221.html" title="如何将字节数组转换为MultipartFile" target="_blank">· 如何将字节数组转换为MultipartFile</a><span class="text-muted pull-right">10-20</span></dd> <dd><a href="https://www.f2er.com/faq/884220.html" title="在java中如何创建一个文件并写入内容?" target="_blank">· 在java中如何创建一个文件并写入内容?</a><span class="text-muted pull-right">10-20</span></dd> <dd><a href="https://www.f2er.com/faq/884219.html" title="星号*在Python中是什么意思?" target="_blank">· 星号*在Python中是什么意思?</a><span class="text-muted pull-right">10-20</span></dd> <dd><a href="https://www.f2er.com/faq/884218.html" title="Flask框架:MVC模式" target="_blank">· Flask框架:MVC模式</a><span class="text-muted pull-right">10-20</span></dd> <dd><a href="https://www.f2er.com/faq/884217.html" title="在JavaScript对象数组中按ID查找对象" target="_blank">· 在JavaScript对象数组中按ID查找对象</a><span class="text-muted pull-right">10-20</span></dd> <dd><a href="https://www.f2er.com/faq/884216.html" title="使用Javascript / jQuery下载文件" target="_blank">· 使用Javascript / jQuery下载文件</a><span class="text-muted pull-right">10-20</span></dd> </dl> <dl class="col-sm-4 site-link"> <dt>好站推荐</dt><dd> <a href="https://www.runoob.com" title="菜鸟教程(www.runoob.com)提供了编程的基础技术教程, 介绍了HTML、CSS、Javascript、Python,Java,Ruby,C,PHP , MySQL等各种编程语言的基础知识。 同时本站中也提供了大量的在线实例,通过实例,您可以更好的学习编程。" target="_blank">菜鸟教程</a></dd><dd> <a href="https://www.jb51.cc" title="编程之家(www.jb51.cc)是成立于2017年面向全球中文开发者的技术内容分享平台。提供编程导航、编程问答、编程博文、编程百科、编程教程、编程工具、编程实例等开发者最需要的编程技术内容与开发工具支持,与你一起学习编程,相信编程改变未来!" target="_blank">编程之家</a></dd><dd> <a href="https://www.f2er.com" title="前端之家 f2er.com 前端开发人员所需学习知识手册。" target="_blank">前端之家</a></dd></dl> <dl class="col-sm-2 site-link"> <dt>商务合作</dt> <dd><a target="_blank" href="http://wpa.qq.com/msgrd?v=3&uin=76874919&site=qq&menu=yes">联系我们</a></dd> </dl> </div> <div class="copyright"> Copyright © 2019 前端之家. 当前版本 V7.0.16<br> <span class="ml5">前端之家 版权所有 <a href="https://beian.miit.gov.cn/" target="_blank" rel="nofollow">闽ICP备13020303号-10</a></span> </div> </div> </footer> <script type="text/javascript" src="https://www.f2er.com/js/base.js"></script> </body> </html>