【问题标题】:How to prevent Bulma modal from showing by default如何防止布尔玛模态默认显示
【发布时间】:2022-08-03 22:48:21
【问题描述】:

根据Bulma\'s site(以及其他任何地方),除非具有“is-active”类属性,否则不应该显示模态框。但是,无论我把它们放在哪里,我的模态都会一直显示为格式化文本。它们不会在页面上弹出,并且总是显示。我猜我需要在 mystyles.css 中添加一些内容,因为“modal”从未出现在 Bulma 创建的 3416 行代码中。

<link href=\"https://cdnjs.cloudflare.com/ajax/libs/bulma/0.9.4/css/bulma.min.css\" rel=\"stylesheet\" />
<div class=\"modal\">
  <div class=\"modal-background\"></div>
  <div class=\"modal-content has-background-white py-5 px-5\">
    <h3 class=\"title mb-6\">
      Hi mom
    </h3>
  </div>
</div>

这是我的网站在页面加载时的样子:

有谁知道我需要添加什么代码才能获得常规的模态行为?

    标签: html css modal-dialog bulma


    【解决方案1】:

    在您的代码 sn-p 中,它工作得很好,并且模态被隐藏(bulma 的.modal 类上的display: none;)。所以你可能没有正确加载布尔玛..

    【讨论】:

      猜你喜欢
      • 2020-12-29
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2022-11-21
      • 2020-09-10
      • 1970-01-01
      相关资源
      最近更新 更多