如何将ngx modal设置到屏幕中间?
How to set ngx modal to the middle of the screen?
如何设置ngx模态到屏幕中央?默认情况下,它几乎在顶部,
class:'modal-dialog-centered',参数上没有任何区别
在ngx-bootstrap的ModalComponent中有一个.modal
class,所以,你可以尝试覆盖它的样式并根据需要定位你的模态
基本上是这样的:
.modal {
position: fixed;
top: 0;
right: 0;
bottom: 0;
left: 0;
}
如何设置ngx模态到屏幕中央?默认情况下,它几乎在顶部, class:'modal-dialog-centered',参数上没有任何区别
在ngx-bootstrap的ModalComponent中有一个.modal
class,所以,你可以尝试覆盖它的样式并根据需要定位你的模态
基本上是这样的:
.modal {
position: fixed;
top: 0;
right: 0;
bottom: 0;
left: 0;
}