css里写font:“”,“”里面各项的属性是什么呢?

比如我在css里,写了这么一句:
.body{
font:“宋体”m n;
}
但是我还想在这个font里面加上大小 粗细。就是想问问m、n这几个地方各是管什么的!!

语法:
font : font-style || font-variant || font-weight || font-size || line-
height || font-family
font : caption | icon | menu | message-box | small-caption | status-bar

取值:
font-style :normal | italic | oblique
font-variant : normal | small-caps
font-weight:normal | bold | bolder | lighter | 100 | 200 | 300 | 400 | 500 | 600 | 700 | 800 | 900
font-size
line-height
font-family
caption : CSS2 使用有标题的系统控件的文本字体(如按钮,菜单等)
icon : CSS2 使用图标标签的字体
menu : CSS2 使用菜单的字体
message-box : CSS2 使用信息对话框的文本字体
small-caption : CSS2 使用小控件的字体
status-bar : CSS2 使用窗口状态栏的字体

示例:
p { font: italic small-caps 600 12pts/18pts 宋体; }
p { font: italic small-caps 600 12pts/150% Courier; }
p { font: italic small-caps 600 12pts/1.5 Courier; }
p { font: italic small-caps 600 12pts/18pts Courier; }
p { font: /18pts serif; }
p { font: oblique 100 24pts; }
H1 { font: 15pt/17pt bold "Arial" normal }
温馨提示:内容为网友见解,仅供参考
第1个回答  2020-04-13
要搞清楚这个问题,首先要明白字体是怎么回事。一种字体有粗体、斜体、下划线、删除线等诸多属性。
但是并不是所有字体都做了这些,一些不常用的字体,或许就只有个正常体,如果你用italic,就没有效果了~这时候你就要用oblique.
可以理解成italic是使用文字的斜体,oblique是让没有斜体属性的文字倾斜!
明白了把?
另外附上css2.0上边的解释你参考下:
italic和oblique都是向右倾斜的文字,
但区别在于italic是指斜体字,而oblique是倾斜的文字,对于没有斜体的字体应该使用oblique属性值来实现倾斜的文字效果.
第2个回答  2010-02-19
font-family:宋体;
font-size:12px;
font-weight:bold; /*加粗*/

颜色都是color,没有font-color
第3个回答  2021-01-04

Vue实践-CSS样式position/display/float属性对比使用

第4个回答  2010-02-10
font:normal normal bold 12px "宋体";
相似回答