<tfoot id='UuMCG'></tfoot>
      <i id='UuMCG'><tr id='UuMCG'><dt id='UuMCG'><q id='UuMCG'><span id='UuMCG'><b id='UuMCG'><form id='UuMCG'><ins id='UuMCG'></ins><ul id='UuMCG'></ul><sub id='UuMCG'></sub></form><legend id='UuMCG'></legend><bdo id='UuMCG'><pre id='UuMCG'><center id='UuMCG'></center></pre></bdo></b><th id='UuMCG'></th></span></q></dt></tr></i><div id='UuMCG'><tfoot id='UuMCG'></tfoot><dl id='UuMCG'><fieldset id='UuMCG'></fieldset></dl></div>
        <bdo id='UuMCG'></bdo><ul id='UuMCG'></ul>

    1. <small id='UuMCG'></small><noframes id='UuMCG'>

      1. <legend id='UuMCG'><style id='UuMCG'><dir id='UuMCG'><q id='UuMCG'></q></dir></style></legend>

      2. 如何使模式窗口在页面上居中?

        时间:2023-06-21

          <i id='zxMHs'><tr id='zxMHs'><dt id='zxMHs'><q id='zxMHs'><span id='zxMHs'><b id='zxMHs'><form id='zxMHs'><ins id='zxMHs'></ins><ul id='zxMHs'></ul><sub id='zxMHs'></sub></form><legend id='zxMHs'></legend><bdo id='zxMHs'><pre id='zxMHs'><center id='zxMHs'></center></pre></bdo></b><th id='zxMHs'></th></span></q></dt></tr></i><div id='zxMHs'><tfoot id='zxMHs'></tfoot><dl id='zxMHs'><fieldset id='zxMHs'></fieldset></dl></div>
              <bdo id='zxMHs'></bdo><ul id='zxMHs'></ul>
              • <legend id='zxMHs'><style id='zxMHs'><dir id='zxMHs'><q id='zxMHs'></q></dir></style></legend>

                • <tfoot id='zxMHs'></tfoot>

                    <tbody id='zxMHs'></tbody>

                  <small id='zxMHs'></small><noframes id='zxMHs'>

                  本文介绍了如何使模式窗口在页面上居中?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  我正在尝试在浏览器页面中居中模式窗口.我只是想把它居中,这样它就可以响应所有的屏幕.

                  I am trying center a modal window in the browser page. I just want to center it, so that it should be responsive for all the screens.

                  推荐答案

                  With position:absolute 假设你的modal是300x300

                  With position:absolute Assuming your modal is 300x300

                  .modal {
                     width: 300px;
                     height: 300px;
                     position: absolute;
                     left: 50%;
                     top: 50%; 
                     margin-left: -150px;
                     margin-top: -150px;
                  }
                  

                  使用 display:table 另一种方法是制作显示表

                  With display:table An alternative way for that is to make display table

                  <div class="modal">
                      <div class="body">
                          <div class="content">
                              Content goes here
                          </div>
                      </div>
                  </div>
                  <style>
                      .modal {display:table;}
                      .body {display:table-cell; vertical-align:middle; text-align:center;}
                  </style>
                  

                  这篇关于如何使模式窗口在页面上居中?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  上一篇:用于删除方法的 Rails 自定义 Twitter Bootstrap 模式,回调问题 下一篇:关闭 Bootstrap 模态 onclick

                  相关文章

                    <i id='4oOHL'><tr id='4oOHL'><dt id='4oOHL'><q id='4oOHL'><span id='4oOHL'><b id='4oOHL'><form id='4oOHL'><ins id='4oOHL'></ins><ul id='4oOHL'></ul><sub id='4oOHL'></sub></form><legend id='4oOHL'></legend><bdo id='4oOHL'><pre id='4oOHL'><center id='4oOHL'></center></pre></bdo></b><th id='4oOHL'></th></span></q></dt></tr></i><div id='4oOHL'><tfoot id='4oOHL'></tfoot><dl id='4oOHL'><fieldset id='4oOHL'></fieldset></dl></div>

                  1. <legend id='4oOHL'><style id='4oOHL'><dir id='4oOHL'><q id='4oOHL'></q></dir></style></legend>

                      <small id='4oOHL'></small><noframes id='4oOHL'>

                      <tfoot id='4oOHL'></tfoot>

                        <bdo id='4oOHL'></bdo><ul id='4oOHL'></ul>