1.CSS字体属性总结
属性 | 表示 | 注意点 |
---|---|---|
font-size | 字号 | 单位为px像素 |
font-family | 字体 | 实际开发中根据团队约定来写 |
font-weight | 字体粗细 | 加粗为700或者bold,普通为normal或者400 |
font-style | 字体样式 | 倾斜为italic,不倾斜是normal |
font | 字体连写 | 1.字体连写是有顺序的,不能随意调换;2.font-size和font-family是不能省略的 |
2. font的复合属性
font:font-style font-weight font-size/font-height font-family;
font: italic 700 16px ‘微软雅黑’;