E040 - alex1221/bootlint-customization GitHub Wiki

E040

在Bootstrap V3版本中,.hide 不能用在 .modal 上.

在 Bootstrap v3 版本中, .modal 类是默认隐藏的. 没必要再添加一个 .hide 类给 .modal, 实际上,添加一个 .hide 类会干扰 .modal的正确显示, 所以不建议这样做.

.modal.hide 这样的组合在Bootstrap v2 版本中是必须的,但是在Bootstrap v3版本中不再支持了. 模态框的标记在 v2 和 v3版本中发生了明显的变化, 因此,在使用 Bootstrap v3的时候,不应该再遵循Bootstrap v2版本的示例.

错误:

<div class="modal hide">
  ...
</div>

正确:

<div class="modal fade">
  ...
</div>

同样正确:

<!--Modal without show/hide animation-->
<div class="modal">
  ...
</div>
⚠️ **GitHub.com Fallback** ⚠️