ng-bootstrap Modal size

前端 未结 9 2161
抹茶落季
抹茶落季 2020-12-29 18:25

What is the best way to set/override a custom width for a modal?

It seems ng-bootstrap currently supports

size: \'sm\' | \'lg\'

9条回答
  •  [愿得一人]
    2020-12-29 18:51

    add following css in style.css file.

    .xlModal > .modal-dialog {
        max-width: 1490px !important;
        min-width: 971px !important;   
        width: 95% !important;
    }
    

    Note : we can replace .xlModal with any name.

    open modal with new created style.

    this.modalService.open(content,{windowClass:"xlModal"});
    

提交回复
热议问题