如何使用流利的工具包将模态放置在页面的右下角?

How to place modal in the bottom right of the page with fluent kit?

我使用fluent-kit package and I want to place the modal window in a bottom right corner of the page. I add .modal-bottom and .modal-right classes to the div.modal-dialog element, as per modal#position docs,但是,它不起作用。

我的HTML

<div class='modal fade' id='modal-example' tabindex='-1' role='dialog' aria-labelledby='modal-example-title' aria-hidden='true'>
  <div class='modal-dialog modal-right modal-bottom' role='document'>
    <div class='modal-content'>
      <div class='modal-header'>
        <h5 class='modal-title' id='modal-example-title'>TITLE</h5>
        <button type='button' class='close' data-dismiss='modal' aria-label='Close'>
          <span aria-hidden='true' class='mi mi-Close'></span>
        </button>
      </div>
      <div class='modal-body'>
        CONTENT
      </div>
      <div class='modal-footer'>
        <button type='button' class='btn btn-default' data-dismiss='modal'>Close</button>
        <button type='button' class='btn btn-primary'>OK</button>
      </div>
    </div>
  </div>
</div>

我确实想专门使用这个包,因为它提供了开箱即用的功能(我可以在文档中看到工作示例)。我 100% 确定我的脚本和样式已正确添加。我错过了什么?

事实证明,所有的 fluent-kit 模态功能都包含在 .fluent-modal 命名空间中。

为了所有位置 classes:

  • .modal-top
  • .modal-bottom
  • .modal-left
  • .modal-right

和额外的 size classes:

  • .modal-full-height
  • .modal-fluid

要工作,您需要将 .fluent-modal class 添加到外部 .modal 元素:

 <div class='modal fade fluent-modal' id='modal-example' tabindex='-1' role='dialog' aria-labelledby='modal-example-title' aria-hidden='true'>
  <div class='modal-dialog modal-right modal-bottom' role='document'>
    <div class='modal-content'>
      <div class='modal-header'>
        <h5 class='modal-title' id='modal-example-title'>TITLE</h5>
        <button type='button' class='close' data-dismiss='modal' aria-label='Close'>
          <span aria-hidden='true' class='mi mi-Close'></span>
        </button>
      </div>
      <div class='modal-body'>
        CONTENT
      </div>
      <div class='modal-footer'>
        <button type='button' class='btn btn-default' data-dismiss='modal'>Close</button>
        <button type='button' class='btn btn-primary'>OK</button>
      </div>
    </div>
  </div>
</div>