如何更改ng-bootstrap弹出窗口的宽度?

时间:2019-08-11 21:25:14

标签: angular ng-bootstrap

我想增加ng-bootstrap popover的宽度,但是我无法用经典的CSS覆盖宽度。

我试图通过popoverClass以及通过配置来改变宽度。但这并不会改变任何事情。

<button 
 style="cursor: pointer; color:#CB444A" 
 placement="right"
 [ngbPopover]="popContent"
 [popoverTitle]="popTitle"
 data-container="#containerElem"
 popoverClass="my-custom-class"
 >help</button>
<ng-template #popTitle >Help</ng-template>
<ng-template #popContent >More Text</ng-template>

和CSS:

.my-custom-class {
    width: 600px;
    background: aliceblue;
    font-size: 125%;
  }

如何更改弹出窗口的宽度?

0 个答案:

没有答案