如何自定义[matToolTip],使其可以呈现内容中的\ r和\ n

时间:2019-05-29 09:20:04

标签: html css angular tooltip

我正在使用matToolTip来提供有关页面的信息。描述包括多行。那么如何使用\ r和\ n在单独的行中显示内容

我尝试了

::ng-deep .matTooltip{
 white-space:pre-line;
 }

但是没用

这是使用matTooltip的按钮

 <button  [matTooltip]="definition|translate"  mat-button class="define"  [disabled]="!isAvailable" >
        <mat-icon>help_outline</mat-icon>
        <span> help</span>
  </button>

内容显示为

this page contains the ongoing projects\r\n\r Please note the reference number to apply and send a mail

0 个答案:

没有答案