我有一个奇怪的问题。我正在使用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包)?
您可以尝试这个
*,
html,
body {
font-size : 1rem;
font-weight : 400;
}