<html>
<head>
<meta charset=utf-8>
<style type="text/css">
/*补全代码*/
li:nth-child(2),li:nth-child(4){
background-color: rgb(255,0,0)
}
</style>
</head>
<body>
<ul>
<li>1</li>
<li>2</li>
<li>3</li>
<li>4</li>
</ul>
</body>
</html>
<head>
<meta charset=utf-8>
<style type="text/css">
/*补全代码*/
li:nth-child(2),li:nth-child(4){
background-color: rgb(255,0,0)
}
</style>
</head>
<body>
<ul>
<li>1</li>
<li>2</li>
<li>3</li>
<li>4</li>
</ul>
</body>
</html>