<legend id='cD2Kb'><style id='cD2Kb'><dir id='cD2Kb'><q id='cD2Kb'></q></dir></style></legend>
    1. <i id='cD2Kb'><tr id='cD2Kb'><dt id='cD2Kb'><q id='cD2Kb'><span id='cD2Kb'><b id='cD2Kb'><form id='cD2Kb'><ins id='cD2Kb'></ins><ul id='cD2Kb'></ul><sub id='cD2Kb'></sub></form><legend id='cD2Kb'></legend><bdo id='cD2Kb'><pre id='cD2Kb'><center id='cD2Kb'></center></pre></bdo></b><th id='cD2Kb'></th></span></q></dt></tr></i><div id='cD2Kb'><tfoot id='cD2Kb'></tfoot><dl id='cD2Kb'><fieldset id='cD2Kb'></fieldset></dl></div>
    2. <small id='cD2Kb'></small><noframes id='cD2Kb'>

          <bdo id='cD2Kb'></bdo><ul id='cD2Kb'></ul>
        <tfoot id='cD2Kb'></tfoot>

        禁用在引导模式区域之外单击以关闭模式

        时间:2023-06-13
      1. <i id='yk7lA'><tr id='yk7lA'><dt id='yk7lA'><q id='yk7lA'><span id='yk7lA'><b id='yk7lA'><form id='yk7lA'><ins id='yk7lA'></ins><ul id='yk7lA'></ul><sub id='yk7lA'></sub></form><legend id='yk7lA'></legend><bdo id='yk7lA'><pre id='yk7lA'><center id='yk7lA'></center></pre></bdo></b><th id='yk7lA'></th></span></q></dt></tr></i><div id='yk7lA'><tfoot id='yk7lA'></tfoot><dl id='yk7lA'><fieldset id='yk7lA'></fieldset></dl></div>
        <tfoot id='yk7lA'></tfoot>
      2. <legend id='yk7lA'><style id='yk7lA'><dir id='yk7lA'><q id='yk7lA'></q></dir></style></legend>

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

                <bdo id='yk7lA'></bdo><ul id='yk7lA'></ul>
                  <tbody id='yk7lA'></tbody>

                  本文介绍了禁用在引导模式区域之外单击以关闭模式的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  我正在制作一个引导网站,其中包含几个引导模式".我正在尝试自定义一些默认功能.

                  I am making a bootstrap website, with a couple of Bootstrap 'Modals'. I'm trying to customize some of the default features.

                  问题是这样的;您可以通过单击背景关闭模式.无论如何要禁用此功能?仅在特定模式上?

                  Problem is this; You can close the modal by clicking on the background. Is there anyway to disable this feature? On specifc modals only?

                  引导模式页面

                  推荐答案

                  在选项章节,在你链接的页面中,你可以看到backdrop选项.使用值 'static' 传递此选项将阻止关闭模式.
                  正如@PedroVagner 在评论中指出的那样,您还可以传递 {keyboard: false} 以防止通过按 Esc 关闭模式.

                  On Options chapter, in the page you linked, you can see the backdrop option. Passing this option with value 'static' will prevent closing the modal.
                  As @PedroVagner pointed on comments, you also can pass {keyboard: false} to prevent closing the modal by pressing Esc.

                  如果你通过js打开模态框使用:

                  If you opening the modal by js use:

                  $('#myModal').modal({backdrop: 'static', keyboard: false})  
                  

                  如果您使用数据属性,请使用:

                  If you are using data attributes, use:

                   <button data-target="#myModal" data-toggle="modal" data-backdrop="static" data-keyboard="false">
                      Launch demo modal
                   </button>`
                  

                  这篇关于禁用在引导模式区域之外单击以关闭模式的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  上一篇:使用 Bootstrap Modal 窗口作为 PartialView 下一篇:Bootstrap Modal 坐在背景后面

                  相关文章

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

                    • <bdo id='UOz8H'></bdo><ul id='UOz8H'></ul>
                      <tfoot id='UOz8H'></tfoot>

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

                    2. <legend id='UOz8H'><style id='UOz8H'><dir id='UOz8H'><q id='UOz8H'></q></dir></style></legend>