Html 谷歌字体家族。按类引用特定的字体。怎么用?
以以下字体为例:Html 谷歌字体家族。按类引用特定的字体。怎么用?,html,css,Html,Css,以以下字体为例: <link href="https://fonts.googleapis.com/css?family=Roboto+Mono:100,300,400,500,700,900" rel="stylesheet"> /* Custom Class : FONT-ROBOTO-MONO[-*] Override : N/A Method : N/A Usage Example : <p class="font-roboto-mono-b
<link href="https://fonts.googleapis.com/css?family=Roboto+Mono:100,300,400,500,700,900" rel="stylesheet">
/*
Custom Class : FONT-ROBOTO-MONO[-*]
Override : N/A
Method : N/A
Usage Example : <p class="font-roboto-mono-bold"></p>
*/
.font-roboto-mono { font-family: Roboto Mono, monospace; }
.font-roboto-mono-thin { font-family: Roboto Mono Thin, monospace; }
.font-roboto-mono-thin-italic { font-family: Roboto Mono Thin Italic, monospace; }
.font-roboto-mono-light { font-family: Roboto Mono Light, monospace; }
.font-roboto-mono-light-italic { font-family: Roboto Mono Light Italic, monospace; }
.font-roboto-mono-regular { font-family: Roboto Mono Regular, monospace; }
.font-roboto-mono-regular-italic { font-family: Roboto Mono Regular Italic, monospace; }
.font-roboto-mono-medium { font-family: Roboto Mono Medium, monospace; }
.font-roboto-mono-medium-italic { font-family: Roboto Mono Medium Italic, monospace; }
.font-roboto-mono-bold { font-family: Roboto Mono Bold, monospace; }
.font-roboto-mono-medium-bold { font-family: Roboto Mono Bold Italic, monospace; }
<p class="font-roboto-mono-bold">Hello world!</p>
根据页面,它有许多字体可供选择
我这样导入它:
<link href="https://fonts.googleapis.com/css?family=Roboto+Mono:100,300,400,500,700,900" rel="stylesheet">
/*
Custom Class : FONT-ROBOTO-MONO[-*]
Override : N/A
Method : N/A
Usage Example : <p class="font-roboto-mono-bold"></p>
*/
.font-roboto-mono { font-family: Roboto Mono, monospace; }
.font-roboto-mono-thin { font-family: Roboto Mono Thin, monospace; }
.font-roboto-mono-thin-italic { font-family: Roboto Mono Thin Italic, monospace; }
.font-roboto-mono-light { font-family: Roboto Mono Light, monospace; }
.font-roboto-mono-light-italic { font-family: Roboto Mono Light Italic, monospace; }
.font-roboto-mono-regular { font-family: Roboto Mono Regular, monospace; }
.font-roboto-mono-regular-italic { font-family: Roboto Mono Regular Italic, monospace; }
.font-roboto-mono-medium { font-family: Roboto Mono Medium, monospace; }
.font-roboto-mono-medium-italic { font-family: Roboto Mono Medium Italic, monospace; }
.font-roboto-mono-bold { font-family: Roboto Mono Bold, monospace; }
.font-roboto-mono-medium-bold { font-family: Roboto Mono Bold Italic, monospace; }
<p class="font-roboto-mono-bold">Hello world!</p>
我创建CSS类:
<link href="https://fonts.googleapis.com/css?family=Roboto+Mono:100,300,400,500,700,900" rel="stylesheet">
/*
Custom Class : FONT-ROBOTO-MONO[-*]
Override : N/A
Method : N/A
Usage Example : <p class="font-roboto-mono-bold"></p>
*/
.font-roboto-mono { font-family: Roboto Mono, monospace; }
.font-roboto-mono-thin { font-family: Roboto Mono Thin, monospace; }
.font-roboto-mono-thin-italic { font-family: Roboto Mono Thin Italic, monospace; }
.font-roboto-mono-light { font-family: Roboto Mono Light, monospace; }
.font-roboto-mono-light-italic { font-family: Roboto Mono Light Italic, monospace; }
.font-roboto-mono-regular { font-family: Roboto Mono Regular, monospace; }
.font-roboto-mono-regular-italic { font-family: Roboto Mono Regular Italic, monospace; }
.font-roboto-mono-medium { font-family: Roboto Mono Medium, monospace; }
.font-roboto-mono-medium-italic { font-family: Roboto Mono Medium Italic, monospace; }
.font-roboto-mono-bold { font-family: Roboto Mono Bold, monospace; }
.font-roboto-mono-medium-bold { font-family: Roboto Mono Bold Italic, monospace; }
<p class="font-roboto-mono-bold">Hello world!</p>
/*
自定义类:FONT-ROBOTO-MONO[-*]
覆写:不适用
方法:不适用
用法示例:
*/
.font roboto mono{font系列:roboto mono,monospace;}
.font roboto mono thin{font系列:roboto mono thin,monospace;}
.font roboto mono thin italic{font系列:roboto mono thin italic,monospace;}
.font roboto mono light{font系列:roboto mono light,monospace;}
.font roboto mono light italic{font系列:roboto mono light italic,monospace;}
.font roboto mono regular{font系列:roboto mono regular,monospace;}
.font roboto mono regular italic{font系列:roboto mono regular italic,monospace;}
.font roboto mono medium{font系列:roboto mono medium,monospace;}
.font roboto mono-medium-italic{字体系列:roboto mono-medium-italic,monospace;}
.font roboto mono bold{font系列:roboto mono bold,monospace;}
.font roboto mono中粗体{字体系列:roboto mono-bold Italic,monospace;}
我这样使用它:
<link href="https://fonts.googleapis.com/css?family=Roboto+Mono:100,300,400,500,700,900" rel="stylesheet">
/*
Custom Class : FONT-ROBOTO-MONO[-*]
Override : N/A
Method : N/A
Usage Example : <p class="font-roboto-mono-bold"></p>
*/
.font-roboto-mono { font-family: Roboto Mono, monospace; }
.font-roboto-mono-thin { font-family: Roboto Mono Thin, monospace; }
.font-roboto-mono-thin-italic { font-family: Roboto Mono Thin Italic, monospace; }
.font-roboto-mono-light { font-family: Roboto Mono Light, monospace; }
.font-roboto-mono-light-italic { font-family: Roboto Mono Light Italic, monospace; }
.font-roboto-mono-regular { font-family: Roboto Mono Regular, monospace; }
.font-roboto-mono-regular-italic { font-family: Roboto Mono Regular Italic, monospace; }
.font-roboto-mono-medium { font-family: Roboto Mono Medium, monospace; }
.font-roboto-mono-medium-italic { font-family: Roboto Mono Medium Italic, monospace; }
.font-roboto-mono-bold { font-family: Roboto Mono Bold, monospace; }
.font-roboto-mono-medium-bold { font-family: Roboto Mono Bold Italic, monospace; }
<p class="font-roboto-mono-bold">Hello world!</p>
世界你好
…什么都没变。我怀疑导入URL中缺少一个参数。如果我需要单独导入每一个,或者只是将它们添加到URL导入中,我似乎无法在网上找到它们
记录在案的是,机器人单声道类是唯一有效的。
*{
字体系列:“Rotobo Mono”;
字号:20pt;
}
.瘦{
字号:100;
}
.光{
字体大小:300;
}
.普通的{
字体大小:400;
}
.中等{
字号:500;
}
.bold{
字号:700;
}
薄
灯
常规
中等
bold
*{
字体系列:“Rotobo Mono”;
字号:20pt;
}
.瘦{
字号:100;
}
.光{
字体大小:300;
}
.普通的{
字体大小:400;
}
.中等{
字号:500;
}
.bold{
字号:700;
}
薄
灯
常规
中等
bold
最终修订版
/*
Custom Class : FONT-ROBOTO-MONO + FONT-WEIGHT-[-*]
Override : N/A
Import : <link href="https://fonts.googleapis.com/css?family=Roboto+Mono:100,100i,300,300i,400,400i,500,500i,700,700i" rel="stylesheet">
Usage Example : <p class="font-roboto-mono font-weight-thin"></p>
*/
/* Initialize */
.font-roboto-mono {
font-family: 'Roboto Mono', monospace;
}
/* Call */
.font-weight-thin {
font-weight: 100;
font-style: normal;
}
.font-weight-thin-italic {
font-weight: 100;
font-style: italic;
}
.font-weight-light {
font-weight: 300;
font-style: normal;
}
.font-weight-light-italic {
font-weight: 300;
font-style: italic;
}
.font-weight-regular {
font-weight: 400;
}
.font-weight-regular-italic {
font-weight: 400;
font-style: italic;
}
.font-weight-medium {
font-weight: 500;
}
.font-weight-medium-italic {
font-weight: 500;
font-style: italic;
}
.font-weight-bold {
font-weight: 700;
}
.font-weight-bold-italic {
font-weight: 700;
font-style: italic;
}
/*
自定义类:FONT-ROBOTO-MONO+FONT-WEIGHT-[-*]
覆写:不适用
进口:
用法示例:
*/
/*初始化*/
.font roboto mono{
字体系列:“Roboto Mono”,monospace;
}
/*召唤*/
.font-weight-thin{
字号:100;
字体风格:普通;
}
.font-weight细斜体{
字号:100;
字体:斜体;
}
.字体重量轻{
字体大小:300;
字体风格:普通;
}
.字体重量轻斜体{
字体大小:300;
字体:斜体;
}
.字体大小常规{
字体大小:400;
}
.font-weight常规斜体{
字体大小:400;
字体:斜体;
}
.字体重量中等{
字号:500;
}
.font-weight中斜体{
字号:500;
字体:斜体;
}
.字体粗体{
字号:700;
}
.font-weight粗体斜体{
字号:700;
字体:斜体;
}
最终修订版
/*
Custom Class : FONT-ROBOTO-MONO + FONT-WEIGHT-[-*]
Override : N/A
Import : <link href="https://fonts.googleapis.com/css?family=Roboto+Mono:100,100i,300,300i,400,400i,500,500i,700,700i" rel="stylesheet">
Usage Example : <p class="font-roboto-mono font-weight-thin"></p>
*/
/* Initialize */
.font-roboto-mono {
font-family: 'Roboto Mono', monospace;
}
/* Call */
.font-weight-thin {
font-weight: 100;
font-style: normal;
}
.font-weight-thin-italic {
font-weight: 100;
font-style: italic;
}
.font-weight-light {
font-weight: 300;
font-style: normal;
}
.font-weight-light-italic {
font-weight: 300;
font-style: italic;
}
.font-weight-regular {
font-weight: 400;
}
.font-weight-regular-italic {
font-weight: 400;
font-style: italic;
}
.font-weight-medium {
font-weight: 500;
}
.font-weight-medium-italic {
font-weight: 500;
font-style: italic;
}
.font-weight-bold {
font-weight: 700;
}
.font-weight-bold-italic {
font-weight: 700;
font-style: italic;
}
/*
自定义类:FONT-ROBOTO-MONO+FONT-WEIGHT-[-*]
覆写:不适用
进口:
用法示例:
*/
/*初始化*/
.font roboto mono{
字体系列:“Roboto Mono”,monospace;
}
/*召唤*/
.font-weight-thin{
字号:100;
字体风格:普通;
}
.font-weight细斜体{
字号:100;
字体:斜体;
}
.字体重量轻{
字体大小:300;
字体风格:普通;
}
.字体重量轻斜体{
字体大小:300;
字体:斜体;
}
.字体大小常规{
字体大小:400;
}
.font-weight常规斜体{
字体大小:400;
字体:斜体;
}
.字体重量中等{
字号:500;
}
.font-weight中斜体{
字号:500;
字体:斜体;
}
.字体粗体{
字号:700;
}
.font-weight粗体斜体{
字号:700;
字体:斜体;
}
@ASPiRE我想我错了。我将编辑我的答案。至于URL导入参数。。。既然你是用纯CSS做造型,它还需要拥有100100i、300300i、400400i、500500i、700700i
?@ASPiRE我想我错了。我将编辑我的答案。至于URL导入参数。。。既然您使用纯CSS进行样式设置,它还需要拥有100100i、300300i、400400i、500500i、700700i
?