CSS常用属性
常用文字属性
color font-size font-family
1、color
单词表示(记一些常用的颜色)、十六进制表示、rgb表示
<body>
<!-- style="color:blue; -->
<p style="color:blue;">文字</p>
</body>
2、font-size
每个浏览器有自己的字号和最小显示字号
<p style="font-size: 50px;">文字大小</p>
3、font-family
<p style="font-family:'华文行楷' ;font-size: 50px;">文字</p>
中英文混杂的同时分别设置
设置多个字体,浏览器按照顺序识别加载
<p style="font-family:'consolas','Arial','华文行楷' ,'宋体','黑体';font-size: 50px;">ing文字</p>
完整代码
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
</head>
<body>
<!-- style="color:blue; -->
<p style="color:blue;">文字颜色</p>
<p style="font-size: 50px;">文字大小</p>
<p style="font-family:'consolas','Arial','华文行楷' ,'宋体','黑体';font-size: 50px;">ing文字</p>
</body>
</html>
盒子三属性
width height background-color
<div style="width: 100px;height: 100px; background-color: palevioletred;">
</div>