1.优先匹配位置后匹配元素或class名 当不写元素时从根标签html开始匹配
1.1:first-child
1.1.1
<!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>
<style>
:first-child {
color: rgb(216, 18, 18);
}
</style>
</head>
<body>
<ol>
<p>2222</p>
<ul>12</ul>
<div>1111</div>
<p>3333</p>
<ul>22</ul>
<ul>32</ul>
</ol>
</body>
</html>
该结果为全红因为他直接匹配到了html这个根标签
1.1.2