【发布时间】:2021-10-19 03:44:11
【问题描述】:
我正在使用带有列标题的 primeNg 表,该表需要将断词分成两行。到目前为止,我尝试了如下的 css
.ui-dataTable thead h {
word-wrap: break-word !important;
}
.break-word {
word-wrap: break-word !important;
}
HTML 代码
<ng-template pTemplate="header">
<tr>
<th class="break-word" *ngFor="let column of columns" pSortableColumn={{column.field}}>{{column.name}} <p-sortIcon field={{column.field}}></p-sortIcon></th>
</tr>
</ng-template>
我什至去了 forum.primefaces.org 但那个 css 建议不起作用。
感谢您的帮助。
【问题讨论】: