我正在尝试从Angular Bootstrap(https://ng-bootstrap.github.io/#/components/modal)实现一个简单的模态
但是,当我单击示例中的按钮(本地实施)时,ngb-modal-window
元素不会过渡到不透明度1。但是,如您所见,它确实包含正确的类(vade Show):
代码:
<ngb-modal-window role="dialog" style="display: block;" tabindex="-1" ng-reflect-class-name="modal fade show" class="modal fade show">
这导致在同一元素上缺少CSS:
.fade.show {
opacity: 1;
}
在我的实现中,由于未知原因在plunker/emosites中显示。
我尝试通过两种方式手动将其添加到我的组件CSS中:
.fade.show {
opacity: 1;
}
ngb-modal-window.modal.fade.show {
opacity: 1;
}
都没有工作。
原因是什么?我想念一些微不足道的东西吗?
更多信息:
- 包括
<template ngbModalContainer></template>
- ngbmodal在组件中导入
- Bootstrap版本4.0.0-Alpha.5
https://github.com/ng-bootstrap/ng-bootstrap/issues/1293
这是在Bootstrap 4.0.0-Alpha.6