设置 Angular Material Tooltip 的字体大小 [英] Set font size of Angular Material Tooltip
问题描述
我对 Web 开发很陌生,我无法弄清楚如何解决以下问题,尽管它可能很容易.
我正在使用 Angular 4 和 Angular Material 来实现这样的工具提示:
<span>显示工具提示</span>
我想让工具提示文本的字体变大.但是,我没有在 Angular Material 文档中找到如何做到这一点,也没有在网上搜索.有没有人知道如何做到这一点?谢谢.
您可以通过在主样式文件中添加 .mat-tooltip
css 声明并更改其中的字体大小来解决此问题.您需要在字体大小上设置 !important
否则它不会显示.
I am very new to web development, and I cannot figure out how to solve the following issue, although it may be very easy.
I am using Angular 4 and Angular Material to implement tooltips like this:
<div mdTooltip="tooltip text" mdTooltipPosition="above">
<span>Show tooltip</span>
</div>
I would like to make the font size of the tooltip text bigger. However, I did not manage to find how to do this in the Angular Material documentation, neither searching in the web. Does anyone have any idea on how to do this? Thanks.
You can fix this by adding a .mat-tooltip
css declaration in you main styles file and change the font size there. You need to set !important
on the font size otherwise it won't show up.
这篇关于设置 Angular Material Tooltip 的字体大小的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!