div h2 {
text-align: center;
color: white;
padding: 0px 20px 0px 20px;
font-family: 'Exo 2';
font-style: normal;
font-weight: 400;
}
@font-face {
font-family: 'Exo 2';
font-style: normal;
font-weight: 300;
src: local('Exo 2 Light'), local('Exo2-Light'), url(https://fonts.gstatic.com/s/exo2/v4/TZlHHgxEfHXA7uKM1eaCjXYhjbSpvc47ee6xR_80Hnw.woff2) format('woff2');
unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2212, U+2215;
}
@font-face {
font-family: 'Exo 2';
font-style: normal;
font-weight: 400;
src: local('Exo 2'), local('Exo2-Regular'), url(https://fonts.gstatic.com/s/exo2/v4/mJrGVjHbrdshrbGyvd7vdaCWcynf_cDxXwCLxiixG1c.woff2) format('woff2');
unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2212, U+2215;
}
我正在尝试使用谷歌字体,我也将它链接到我的 html 文件中,如下所示:
<link href="https://fonts.googleapis.com/css?family=Exo+2:300,400" rel="stylesheet">
不幸的是,在我添加字体样式后,文本没有显示出来。我的做法有问题吗?
我在这里先向您的帮助表示感谢。