批改状态:未批改
老师批语:
4月25日作业
CSS中的常用选择器
体会伪类选择器的作用,
以及易混淆的: nth-child(), nth-of-type()
常用选择器
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>作业</title>
<style>
.box{border: solid lightblue 10px;width: 50%;padding-left:30px ;}
p {font-size: 40px;}
#p_id{font-family: 幼圆;color: lightgreen;}
.p_class{font-family: 黑体;font-size: 55px;color: #ffffff;background-color: lightseagreen;}
</style>
</head>
<body>
<div class="box">
<p>我是标签选择器</p>
<p id="p_id">我是ID选择器</p>
<ul class="p_class">
<li>我是Class选择器一</li>
<li>我是Class选择器二</li>
</ul>
<p style="background-color: #2aabd2">我是属性选择器</p>
</div>
</body>
</html>点击 "运行实例" 按钮查看在线实例
Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号