<link rel="stylesheet" type="text/css" href="./site.css">
@font-face {
font-family: 'Merriweather';
src: url('./Merriweather/Merriweather-Regular.eot');
src: url('./Merriweather/Merriweather-Regular.eot?#iefix') format('embedded-opentype'),
url('./Merriweather/Merriweather-Regular.woff2') format('woff2'),
url('./Merriweather/Merriweather-Regular.woff') format('woff'),
url('./Merriweather/Merriweather-Regular.svg#Merriweather-Regular') format('svg');
font-weight: normal;
font-style: normal;
font-display: swap;
}
@font-face {
font-family: 'Roboto';
src: url('./Roboto/Roboto-Regular.eot');
src: url('./Roboto/Roboto-Regular.eot?#iefix') format('embedded-opentype'),
url('./Roboto/Roboto-Regular.woff2') format('woff2'),
url('./Roboto/Roboto-Regular.woff') format('woff'),
url('./Roboto/Roboto-Regular.svg#Roboto-Regular') format('svg');
font-weight: normal;
font-style: normal;
font-display: swap;
}
h1 {
font-family: "Merriweather", sans-serif;
font-size: 50px;
font-weight: 700;
line-height: 1.25;
color: rgba(0, 0, 0, 0.85);
margin-bottom: 25px
}
这样你的html页面一级标题就可以应用新的字体了。