介绍
本文是在学习CSS时做的学习笔记,所有笔记内容为 CSS学习笔记
字体的简写属性
<html lang="en">
<head>
<meta charset="UTF-8">
<title>meta</title>
</head>
<style>
div{
border :1px red solid;
1、font 可以设置字体相关的所有属性
语法:
font:字体大小/行高 字体族
行高 可以省略不写 如果不写会使用默认值并覆盖设置的 line-height
2、简写属性,省略了不是不写,而是默认值覆盖掉了
font:italic bold 50px/2 'Times New Roman';
3、font-weight 字重 字体的加粗
可选值
normal 默认值,不加粗
bold 加粗
100-900 9个加粗级别(没什么用)
font-weight:normal;
4、 font-style:
normal 正常的
italic 斜体
font-style:italic
}
</style>
<body>
<div>
今天天气不错 hello hello
</div>
</body>
</html>