<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>结构伪类选择器</title>
<style>
li:first-child {
background-color: greenyellow;
}
li:last-child {
background-color: green;;
}
/* li:nth-child(2n) */
li:nth-child(3) {
background-color: purple;
}
</style>
</head>
<body>
<ol>
<li>This</li>
<li>is</li>
<li>ordered</li>
<li>list</li>
</ol>
</body>
</html>
CSS之结构伪类选择器
最新推荐文章于 2025-12-25 15:09:28 发布
1129

被折叠的 条评论
为什么被折叠?



