bootstrap 模態 modal 小例子【轉】

bootstrap 模態 modal  小例子

<html>
 <head> 
  <meta charset="utf-8" /> 
  <title>Bootstrap 實例 - 模態框(Modal)插件</title> 
  <link href="http://libs.baidu.com/bootstrap/3.0.3/css/bootstrap.min.css" rel="stylesheet" /> 
  <script src="http://libs.baidu.com/jquery/2.0.0/jquery.min.js"></script> 
  <script src="http://libs.baidu.com/bootstrap/3.0.3/js/bootstrap.min.js"></script> 

 </head> 
 <body> 
  <h2>建立模態框(Modal)</h2> 

  <button class="btn btn-primary btn-lg"   data-remote="false" href="d.html" data-toggle="modal" data-target="#myModal"> 開始演示模態框 </button> 
  



  <div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true"> 
   <div class="modal-dialog" style="width:600px"> 
    <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)標題2 </h4> 
     </div> 
            1<br/>2<br/>3<br/>
     <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> 
   </div> 
  </div>  


 </body>
</html>

 

bug1 bootstrap3打開modal後下層網頁內容出現右移

參考: bootstrap3打開modal後下層網頁內容出現右移 css

聽說能夠,但變成其它地方移動了.html

.modal-open {
  overflow: initial !important;
}
相關文章
相關標籤/搜索