BootStrap框架彈窗用Modal

2019-11-08 13:50:37濟南做網站速動科技

插入iframe框架

<button type="button" class="btn btn-default" data-toggle="modal" data-target="#addModal"><span class="glyphicon glyphicon-plus"></span> 新增</button>
<div class="modal fade" id="addModal" tabindex="-1" role="dialog" aria-hidden="true" style="top: 10px;">
  <div class="modal-dialog" style="width: 1200px;">
    <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">新增</h4>
      </div>
      <div class="modal-body" style="height: 500px;">
        <iframe frameborder="0" src="userInfo_edit.html" scrolling="no" style="margin:0 auto;width:100%;height:100%;"></iframe>
      </div>
      <div class="modal-footer">
        <button type="button" class="btn btn-primary">確定</button>
        <button type="button" class="btn btn-default" data-dismiss="modal">關閉</button>
      </div>
    </div>
  </div>
</div>

直接在頁面彈窗:

<a href="#" data-toggle="modal" data-target="#delModal">刪除</a>

<div class="modal fade" id="delModal" tabindex="-1" role="dialog" aria-hidden="true" data-backdrop="static" data-keyboard="false" style="top: 100px;">
  <div class="modal-dialog" style="width: 400px;">
    <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">刪除</h4>
      </div>
      <div class="modal-body">
        您確定要刪除嗎?
      </div>
      <div class="modal-footer">
        <button type="button" class="btn btn-primary">確定</button>
        <button type="button" class="btn btn-default" data-dismiss="modal">關閉</button>
      </div>
    </div>
  </div>
</div>

上一篇:

BootStrap 模態(tài)框禁用空白處點擊關閉

下一篇:

網頁布局有哪幾種,有什么區(qū)別? 返 回

Copyright © 2009-2020 JnSuDong.Com All Right Reserved.  魯ICP備19043865號