【发布时间】:2014-09-03 21:56:11
【问题描述】:
我尝试在 Cloud9 IDE 上使用 Google 字体,但页面一直显示默认字体。
起初我以为我的代码有问题,但我已将 HTML 和 CSS 精简到最低限度,但仍然无法正常工作。
我在 codepen.io 上尝试过相同的代码,它工作得很好。
Cloud9 上的 Google 字体是否存在已知问题,或者我遗漏了什么?
这里是Workspace in Cloud9 和Pen in Codepen 的链接。
这是我正在使用的代码。
HTML:
<head>
<link href="test.css" rel="stylesheet">
<link href="http://fonts.googleapis.com/css?family=Lato:300,400&subset=latin,latin-ext" rel="stylesheet" type="text/css">
</head>
<body>
<h1>This is a text.</h1>
</body>
CSS:
h1 {
font-family: "Lato", sans-serif;
font-weight: 300;
}
【问题讨论】:
标签: html css cloud9-ide google-font-api