<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Bootstrap 实例 - 模态框(Modal)插件</title>
<link rel="stylesheet" href="https://cdn.static.runoob.com/libs/bootstrap/3.3.7/css/bootstrap.min.css">
<script src="https://cdn.static.runoob.com/libs/jquery/2.1.1/jquery.min.js"></script>
<script src="https://cdn.static.runoob.com/libs/bootstrap/3.3.7/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">
&times;
</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>
或者脚本控制
<script>
$('#myModal').modal('toggle');
</scirpt>

原文:http://www.runoob.com/try/try.php?filename=bootstrap3-plugin-modal

最新文章

  1. SAP打印机配置
  2. js清除浏览器缓存的几种方法
  3. 【POJ 3525】Most Distant Point from the Sea(直线平移、半平面交)
  4. Go cron定时任务的用法
  5. python练习程序(c100经典例20)
  6. poj 1330 Nearest Common Ancestors 裸的LCA
  7. C#--深入分析委托与事件
  8. BootStrap入门教程 (一) :手脚架Scaffolding(全局样式(Global Style),格网系统(Grid System),流式格网(Fluid grid System),自定义(Customing),布局(Layouts))
  9. [转] 详解http和https的作用与区别
  10. 重新开始学习javase_内部类
  11. EBS服务器管理
  12. 那些必须要知道的Javascript
  13. php数据排序---array_multisort
  14. 使用Spring构建RMI服务器和客户端
  15. Java 数据结构与算法分析学习
  16. [转]Apache Commons IO入门教程
  17. 1-4-bootloader架构学习
  18. Optical Flow related Tutorials
  19. Django(命名URL和URL反向解析)
  20. 俄罗斯方块(JS+CSS)

热门文章

  1. JAVA中this用法小结[转]
  2. 不知道算不算另类的ASP.NET MVC4 Ajax分页
  3. LeetCode_Combination Sum II
  4. 2015第24周一Spring事务
  5. POJ2367 Genealogical tree (拓扑排序)
  6. IOS uitableviewcell 向左滑动删除编辑等
  7. 图片实时预览JSP加js
  8. sql加强练习
  9. 用Scertify Professional实现代码审查
  10. [Cycle.js] Generalizing run() function for more types of sources