bootstrap模态框
来源:互联网 发布:零售业大数据应用实例 编辑:程序博客网 时间:2024/06/08 17:55
前言:
最近在项目中jsp使用的是bootstrap,弹出框要设置成自带遮罩的模态框,所以就在网站上找到了bootstrap的模态框制作方法。记录在这里
模态框(Modal)是覆盖在父窗体上的子窗体。通常,目的是显示来自一个单独的源的内容,可以在不离开父窗体的情况下有一些互动。子窗体可提供信息、交互等。
如果您想要单独引用该插件的功能,那么您需要引用 modal.js。或者,正如 Bootstrap 插件概览 一章中所提到,您可以引用 bootstrap.js 或压缩版的 bootstrap.min.js。
<!DOCTYPE html><html><head><meta charset="utf-8"> <title>Bootstrap 实例 - 模态框(Modal)插件</title><link rel="stylesheet" href="http://cdn.static.runoob.com/libs/bootstrap/3.3.7/css/bootstrap.min.css"><script src="http://cdn.static.runoob.com/libs/jquery/2.1.1/jquery.min.js"></script><script src="http://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">×</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>这是最简单的一种,效果如下
阅读全文
0 0
- bootstrap--模态框
- bootstrap 模态框
- BootStrap模态框
- bootstrap模态框
- bootstrap模态框
- BootStrap 模态框
- Bootstrap 模态框
- Bootstrap模态框
- bootstrap模态框
- Bootstrap模态框
- BootStrap模态框
- bootstrap模态框
- bootstrap模态框
- Bootstrap模态框
- Bootstrap模态框
- bootstrap模态框
- bootstrap模态框
- bootstrap模态框
- linux虚拟机连接主机MySQL
- javascript Date对象
- 破解教程 第一课
- MySql,delete数据时别名和表关联的正确使用方法
- Day15
- bootstrap模态框
- ShadowSocks-qt5 V3.0.0配置
- 【字符串反转总结】Java中七种方法实现
- springmvc图片上传后压缩处理
- vi(vim) 编辑器之神的神操作命令---大仙的成长道路
- 如何用Coding Block
- unityの刚体坑
- 选择正确的云服务供应商时首要考虑的因素
- leetcode 560. Subarray Sum Equals K 动态规划DP子数组求和