【发布时间】:2018-04-09 15:04:00
【问题描述】:
我使用了 Google Fonts 中关于如何设置字体的建议。于是我做了以下动作:
1) 在页面上添加了这个依赖:
<link href="https://fonts.googleapis.com/css?family=Roboto:100,400,700&subset=cyrillic-ext" rel="stylesheet">
2) 设置CSS为body标签:
html, body {
font-family: 'Roboto', sans-serif;
background: #f7f7f7;
}
当我尝试为其他元素设置字体时:
a {
font-family: Roboto-Light;
}
它不起作用。
【问题讨论】:
标签: css html fonts google-webfonts