css设置字母数字字体库信息
作者:互联网
引入字母数字字体库,当前展示效果如下:
对于css的引入font-face设置
@font-face {
font-family: "Source Sans Pro";
src: local("Source Sans Pro"), url("/fonts/Source_Sans_Pro/SourceSansPro-Regular.ttf");
}
@font-face {
font-family: "Source Sans Pro";
src: local("Source Sans Pro Light"), url("/fonts/Source_Sans_Pro/SourceSansPro-Light.ttf");
font-weight: 300;
}
@font-face {
font-family: "Source Sans Pro";
src: local("Source Sans Pro Semibold"), url("/fonts/Source_Sans_Pro/SourceSansPro-Semibold.ttf");
font-weight: 600;
}
@font-face {
font-family: "Roboto Mono";
src: local("Roboto Mono"), url("/fonts/Roboto_Mono/RobotoMono-Regular.ttf");
}
@font-face {
font-family: "Dosis";
src: local("Dosis Medium"), url("/fonts/Dosis/Dosis-Medium.ttf");
font-weight: 500;
}
在html中标签引用
body {
font-family: "Source Sans Pro", "Helvetica Neue", Arial, sans-serif;
}
标签:Sans,family,字母,face,Source,字体库,font,Pro,css 来源: https://blog.csdn.net/cxwtsh123/article/details/104923879