<!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>
p:first-child{
color: yellow;
}
p:last-child{
color: pink;
}
p:nth-child(5){
color: blue;
}
p:nth-child(odd){
background-color: red;
}
p:nth-child(even){
background-color: blue;
}
p:nth-child(3n+1){
font-size: 28px;
}
p:nth-child(3n+2){
width: 100px;
}
</style>
</head>
<body>
<p>段落标签</p>
<p>段落标签</p>
<p>段落标签</p>
<p>段落标签</p>
<p>段落标签</p>
<p>段落标签</p>
<p>段落标签</p>
<p>段落标签</p>
</body>
</html>