如何使用引导程序或CSS重置整个网站的字体大小?

问题描述 投票:0回答:1

我有一个奇怪的问题。我正在使用Angular 8 MVC C#应用程序。使用默认的浏览器字体,网站可以正常工作。但是,我们必须包含部门Nuget程序包,用于页眉,页脚和某些菜单。通过包括此内容,我在网站上的所有字体都大大减小了尺寸(约7.5像素)。我尝试将bootstarp 4.0正文标记中的font-size和font-weight更改为!important:

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
  font-size: 1rem !important;
  font-weight: 400 !important;
  line-height: 1.5;
  color: #212529;
  text-align: left;
  background-color: #fff;
}

这没有帮助。为了将所有html都修复为默认大小,我应该更改什么(我不能更改Nuget包)?

css angular bootstrap-4 font-size
1个回答
0
投票

您可以尝试这个

*,
html,
body {
  font-size : 1rem;
  font-weight : 400;
 }
© www.soinside.com 2019 - 2024. All rights reserved.