css_sduty/06_CSS复合选择器/01_交集选择器.html
2024-06-29 18:53:19 +08:00

39 lines
703 B
HTML

<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>01_交集选择器</title>
<style>
.rich {
color: red;
}
.beauty {
color: blue;
span {
color: green;
}
}
#wc {
color: pink;
}
p.beauty {
color: green;
}
</style>
</head>
<body>
<h2 class="rich">土豪张三</h2>
<h2 class="beauty">明星<span>李四</span></h2>
<hr>
<p class="beauty" id="wc">小狗旺财</p>
<p class="beauty">小猪佩奇</p>
</body>
</html>