【问题标题】:Why does Google Fonts half works through Visual Studio?为什么谷歌字体一半通过 Visual Studio 工作?
【发布时间】:2020-01-19 14:25:16
【问题描述】:

当我使用 Visual Studio Code 创建页面时,字体看起来不错。 当我开始使用 Visual Studio 时(无论是通过调试还是在 azure 中运行),部分文本变得扭曲。

看起来不错的文本和看起来不好(扭曲)的文本之间的区别在于,看起来不太好的文本是我在页面上手动编写的文本 - 在 HTML 文件中。

看起来不错的文本是从 XML 文件加载并使用 document.InnerHTML.GetElementById.. 命令。

有人有idia?

我试图改变谷歌链接的位置 - 没有改变..

<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;
}

【问题讨论】:

    标签: javascript html css google-font-api


    【解决方案1】:

    您可以使用此代码

        <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>
        &lt;div class=""&gt;lorem ipsum dolor sit amet&lt;/div&gt;

    【讨论】:

      猜你喜欢
      • 2017-06-08
      • 1970-01-01
      • 2016-11-04
      • 1970-01-01
      • 2016-04-08
      • 2015-05-14
      • 1970-01-01
      • 1970-01-01
      • 2016-01-10
      相关资源
      最近更新 更多