当我使用 Visual Studio Code 创建页面时,字体看起来不错。 当我开始使用 Visual Studio 时(无论是通过调试还是在 azure 中运行),部分文本变得扭曲。
看起来不错的文本和看起来不好(扭曲)的文本之间的区别在于,看起来不好的文本是我在页面上手动编写的文本 - 在 HTML 文件中。
看起来不错的文本是从 XML 文件加载并使用 document.InnerHTML.GetElementById.. 命令。
有人有 idia 吗?
我已经尝试更改 google 链接的位置 - 没有变化..
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Assistant|Heebo&display=swap">
body {
background: #fdfdfe;
box-sizing: border-box;
font-family: 'Assistant', sans-serif;
color: #51565d;
line-height: 1.8;
height: 100%;
text-align: right;
direction: rtl;
overflow-y:scroll;
font-size: 16px;
}
最佳答案
您可以使用此代码
<link href="https://fonts.googleapis.com/css?family=Assistant&display=swap" rel="stylesheet">
<style type="text/css">
body {
background: #fdfdfe;
box-sizing: border-box;
font-family: 'Assistant', sans-serif;
color: #51565d;
line-height: 1.8;
height: 100%;
text-align: right;
direction: rtl;
overflow-y:scroll;
font-size: 16px;
}
</style>
<div class="">lorem ipsum dolor sit amet</div>
关于javascript - 为什么 Google Fonts 通过 Visual Studio 可以工作一半?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/57995982/