简体   繁体   English

在 ag-grid v25 angular 10 中设置字体系列和大小

[英]Set font family & size in ag-grid v25 angular 10

How do I set the font and it's size in ag-grid (angular) I am using ag-grid version 25 in angular 10. I tried setting up the font in the wrapper container (div) and tag but nothing worked so far.如何在 ag-grid(角度)中设置字体及其大小我在 angular 10 中使用 ag-grid 版本 25。我尝试在包装容器(div)和标签中设置字体,但到目前为止没有任何效果。

.wrapper-container {
   font-size : 10px;
   font-family : "Open Sans";
}

and

ag-grid-angular {
   font-size : 10px;
   font-family: "Open Sans";
}

If you're using any theme, you can set the font family in the styles.scss using the theme class如果您使用任何主题,您可以使用主题 class 在 styles.scss 中设置字体系列

.ag-theme-alpine {
  font-family: "Open Sans", sans-serif;
}

also, the font-size can be set in custom class within the ag-grid-angular tag.此外,字体大小可以在 ag-grid-angular 标签内的自定义 class 中设置。

<ag-grid-angular 
   class="ag-theme-alpine custom-class" .... >
</ag-grid-angular>

in custom-class set your font-size在自定义类中设置你的字体大小

.custom-class {
   font-size : 10px
}

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM