【发布时间】:2018-04-01 03:27:43
【问题描述】:
我目前正在尝试在 Angular 5 中设置引导 4 模态窗口的样式。
我已将 scss 导入到我的 global.scss 中,并且我正在为模态窗口提供 customClass,如下所示。
this.modalService.open(content, { windowClass: 'tutorial'});
到目前为止,弹出窗口显示在左下角。但是我想要实现的是像这种情况下的底部模态。
https://www.w3schools.com/howto/tryit.asp?filename=tryhow_css_modal_bottom
但无论我做什么,我似乎都无法让它发挥作用。
我似乎无法一直拉伸模态。这是我目前的 scss
.tutorial {
position: fixed;
top: auto;
bottom: 0px;
width: 100%;
.modal-dialog{
margin: 0;
}
}
我认为 width: 100% 会很好,但不知何故它不起作用。 有什么想法吗?
【问题讨论】:
-
试试
min-width:100%;或width:100% !important; -
好的 min-width 100% in modal-dialog 工作
标签: css sass angular2-modal