Bootstrap模态对话框用法简单示例
网络编程 2021-07-04 16:46www.168986.cn编程入门
这篇文章主要介绍了Bootstrap模态对话框用法,结合实例形式分析了Bootstrap模态对话框的简单创建与使用操作技巧,需要的朋友可以参考下
本文实例讲述了Bootstrap模态对话框用法。分享给大家供大家参考,具体如下:
环境:bootstrap-3.3.5,jquery-3.0.0
代码:
<!DOCTYPE html> <html> <head> <title>.jb51. bootstrap模态对话框</title> <meta http-equiv="Content-type" content="text/html; charset=utf-8"> <link rel="stylesheet" href="https://cdn.bootcss./bootstrap/3.3.5/css/bootstrap.min.css" rel="external nofollow" /> <link rel="stylesheet" href="https://cdn.bootcss./bootstrap/3.3.5/css/bootstrap-theme.min.css" rel="external nofollow" /> <script src="https://cdn.bootcss./jquery/3.0.0/jquery.min.js" ></script> <script src="https://cdn.bootcss./bootstrap/3.3.5/js/bootstrap.min.js" ></script> </head> <body> <h2>创建模态框(Modal)</h2> <!-- 按钮触发模态框 --> <button class="btn btn-primary btn-lg" data-toggle="modal" data-target="#myModal"> 开始演示模态框 </button> <!-- 模态框(Modal) --> <div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true"> <div class="modal-dialog"> <div class="modal-content"> <div class="modal-header"> <button type="button" class="close" data-dismiss="modal" aria-hidden="true"> × </button> <h4 class="modal-title" id="myModalLabel"> 模态框(Modal)标题 </h4> </div> <div class="modal-body"> 在这里添加一些文本 </div> <div class="modal-footer"> <button type="button" class="btn btn-default" data-dismiss="modal">关闭 </button> <button type="button" class="btn btn-primary"> 提交更改 </button> </div> </div><!-- /.modal-content --> </div><!-- /.modal --> </div> </body> </html>
长沙网络推广已经将代码中所引用的bootstrap相关css、js文件全部换成了cdn形式,方便测试。
这里使用在线HTML/CSS/JavaScript代码运行工具:测试,可得到如下显示效果:
PS:关于bootstrap布局,这里再为大家推荐一款本站的在线可视化布局工具供大家参考使用:
在线bootstrap可视化布局编辑工具:
希望本文所述对大家基于bootstrap的程序设计有所帮助。
编程语言
- 机械手焊接机器人编程 机械手焊接设备编程
- vb数据库编程实例,vb做数据库
- tiobe世界编程语言排行榜,全球编程语言排行
- 成都java编程培训 成都it编程培训中心
- 编程基础培训,编程基础知识培训
- flash游戏编程基础教程,flash游戏开发教程
- 不会英语能学编程吗 不会英语可以学程序员吗
- 爱心代码编程C语言 爱心代码编程c语言公式
- c语言编程学习入门 c语言编程快速入门
- 西门子plc编程培训 西门子plc编程培训班
- 哪里可以学编程 台州哪里可以学编程
- 少儿编程哪个好 少儿编程哪个品牌好
- 编程是什么意思,图形编程是什么意思
- c语言编程软件下载,c语言编程软件在哪下载
- java编程软件下载,java编程下载手机版
- ug编程培训学校,ug编程培训教程