Bootstrap Modal-Bootstrap模态框

介:Bootstrap框架简洁、直观、强悍、移动设备优先的前端开发框架,让web开发更迅速、简单。在这里将以最简洁的方式介绍Bootstrap框架的各个组件的实践示例。

Bootstrap组件:

  1. Bootstrap Modal-Bootstrap模态框
  2. Bootstrap tooltip-Bootstrap弹出框
一、Bootstrap Modal实践:
文档:Bootstrap Modal.htm
  1. <!DOCTYPE html>  
  2. <html lang="zh-CN">  
  3. <head>  
  4.     <!-- Meta, title, CSS, favicons, etc. -->  
  5. <meta charset="utf-8">  
  6. <meta http-equiv="X-UA-Compatible" content="IE=edge">  
  7. <meta name="viewport" content="width=device-width, initial-scale=1.0">  
  8. <meta name="description" content="">  
  9. <meta name="author" content="">  
  10.   
  11. <title>Bootstrap Modal</title>  
  12.   
  13. <!-- Bootstrap core CSS -->  
  14. <link href="http://cdn.bootcss.com/twitter-bootstrap/3.0.2/css/bootstrap.min.css" rel="stylesheet">  
  15.   
  16.   
  17.   </head>  
  18.   <body>  
  19.   
  20.     <!-- sample modal content -->  
  21.     <div id="myModal" class="modal fade" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">  
  22.       <div class="modal-dialog">  
  23.         <div class="modal-content">  
  24.   
  25.           <div class="modal-header">  
  26.             <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>  
  27.             <h4 class="modal-title" id="myModalLabel">Modal Heading</h4>  
  28.           </div>  
  29.           <div class="modal-body">  
  30.             <h4>Text in a modal</h4>  
  31.     
  32.           </div>  
  33.           <div class="modal-footer">  
  34.             <button type="button" class="btn btn-default" data-dismiss="modal">Close</button>  
  35.             <button type="button" class="btn btn-primary">Save changes</button>  
  36.           </div>  
  37.   
  38.         </div><!-- /.modal-content -->  
  39.       </div><!-- /.modal-dialog -->  
  40.     </div><!-- /.modal -->  
  41.   
  42.     <div class="bs-example" style="padding-bottom: 24px;">  
  43.       <button class="btn btn-primary btn-lg" data-toggle="modal" data-target="#myModal">Launch demo modal</button>  
  44.     </div><!-- /example -->  
  45.   
  46. <script src="http://cdn.bootcss.com/jquery/1.10.2/jquery.min.js"></script>  
  47. <script src="http://cdn.bootcss.com/twitter-bootstrap/3.0.2/js/bootstrap.min.js"></script>  
  48.   </body>  
  49. </html>  
<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <!-- Meta, title, CSS, favicons, etc. -->
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="description" content="">
<meta name="author" content="">

<title>Bootstrap Modal</title>

<!-- Bootstrap core CSS -->
<link href="http://cdn.bootcss.com/twitter-bootstrap/3.0.2/css/bootstrap.min.css" rel="stylesheet">


  </head>
  <body>

    <!-- sample modal content -->
    <div id="myModal" class="modal fade" 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 Heading</h4>
          </div>
          <div class="modal-body">
            <h4>Text in a modal</h4>
  
          </div>
          <div class="modal-footer">
            <button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
            <button type="button" class="btn btn-primary">Save changes</button>
          </div>

        </div><!-- /.modal-content -->
      </div><!-- /.modal-dialog -->
    </div><!-- /.modal -->

    <div class="bs-example" style="padding-bottom: 24px;">
      <button class="btn btn-primary btn-lg" data-toggle="modal" data-target="#myModal">Launch demo modal</button>
    </div><!-- /example -->

<script src="http://cdn.bootcss.com/jquery/1.10.2/jquery.min.js"></script>
<script src="http://cdn.bootcss.com/twitter-bootstrap/3.0.2/js/bootstrap.min.js"></script>
  </body>
</html>
自定义BOOTSTRAP框架Modal的宽高和显示位置,请访问:http://qoophp.com/archives/187
源码下载: http://download.csdn.net/detail/rowisdom/6624741
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值