Bootstrap模态对话框
2016-07-14 10:28
573 查看
环境:bootstrap-3.3.5,jquery-3.0.0
代码:
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-type" content="text/html; charset=utf-8">
<link rel="stylesheet" href="css/bootstrap.min.css" />
<link rel="stylesheet" href="css/bootstrap-theme.min.css" />
<script src="jquery-3.0.0.min.js" ></script>
<script src="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>
![](http://img.blog.csdn.net/20160714102715893?watermark/2/text/aHR0cDovL2Jsb2cuY3Nkbi5uZXQv/font/5a6L5L2T/fontsize/400/fill/I0JBQkFCMA==/dissolve/70/gravity/Center)
代码:
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-type" content="text/html; charset=utf-8">
<link rel="stylesheet" href="css/bootstrap.min.css" />
<link rel="stylesheet" href="css/bootstrap-theme.min.css" />
<script src="jquery-3.0.0.min.js" ></script>
<script src="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>
相关文章推荐
- Bootstrapvalidator插件feedbackIcons的作用
- bootstrap 只显示选择年份的 十年视图日期控件实现
- Bootstrap Dialog 使用
- bootstrap 模态窗口实例
- BootstrapTest_3(基础排板样式-2)
- 【转】让Bootstrap 3兼容IE8浏览器
- bootstrap教程(一)--bootstrap简介
- bootstrap教程(一)--bootstrap简介
- 关于bootstrap插件datepicker
- Bootstrap JS插件系列总结
- 【Bootstrap 多级菜单】
- 分类器组合方法Bootstrap, Boosting, Bagging, 随机森林(二)
- BootStrap
- Bootstrap的Refresh Icon也spin起来
- JS组件福利大放送 推荐12款好用的Bootstrap组件
- bootstrap 2016.07.12回顾
- bootstrap3-dialog使用实例
- Bootstrap登陆注册页面开发教程
- Bootstrap组件系列之福利篇几款好用的组件(推荐二)
- JS组件系列——Bootstrap组件福利篇:几款好用的组件推荐(二)