html - 为什么google font 'Roboto' 权重100后看起来还是胖?

标签 html css fonts

<head>
   <title>Privacy Policy</title>
   <link href="https://fonts.googleapis.com/css?family=Roboto" rel="stylesheet">



<h2>Brief summary of our Privacy Policy</h2>

    <div class="text">

        <p>We value your privacy.</p>

            <h3>General</h3>

CSS

body
{
  background-color: black;
  font-family: 'Roboto',sans-serif;
  color: white;
}

h1 {
  color: #fffffe;
  font-size: 20pt;
  letter-spacing: 0.2pt;
  font-weight: 400;
}

h2 {
  color: #fffffe;
  font-size: 40pt;
  text-align: center;
  font-weight: 100;
}

图片的第一部分是我的结果。
第二部分是我需要得到的地方。
第三部分来自谷歌字体。

最佳答案

您需要选择100 字体粗细。

h2 {
  color: #fffffe;
  font-size: 40pt;
  text-align: center;
  font-weight: 100;
}

h1 {
  color: #fffffe;
  font-size: 20pt;
  letter-spacing: 0.2pt;
  font-weight: 400;
}

body {
  background-color: black;
  font-family: 'Roboto', sans-serif;
  color: white;
}
<link href="https://fonts.googleapis.com/css?family=Roboto:100,400" rel="stylesheet">
<h1>this is an h1</h1>
<h2>Brief summary of our Privacy Policy</h2>

关于html - 为什么google font 'Roboto' 权重100后看起来还是胖?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/42397503/

相关文章:

html - 为什么我的无序列表没有位于居中图像旁边?

javascript - 自动对齐脚本在页面加载时不对齐,但在刷新时不对齐?

android - 确定用户字体大小选择

css - .eot 在 IE 中不工作

html - 将此渐变图像转换为 CSS 渐变

javascript - 如何编写模块化 JavaScript 代码(库)

html - 粘性页脚属性不兼容移动设备

html - CSS 选择图像/vs\

css - HTML5 元素在 IE8 中打印时丢失 CSS 类

azure - 在 docker 镜像中安装包时出现错误