css基础选择器
基础选择器:
1.通用选择器 2. 标签选择器 3.类选择器 4.id选择器
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title>自己试的</title>
<style type="text/css">
*{
color: green;font-size: 20px;
}
span{
color: red;background: lightblue;text-decoration: none;
}
p{
color: blue;text-decoration: underline;
}
.a{color: yellow;background: thistle;
}
#p{height: 900px;width: 500px;color: black
}
.yi{
text-decoration: none;
}
</style>
</head>
<body>
<span class="a" id="p" style="color: darkslategray;background: lightcoral;">我是span标签</span>
<span>我是span标签</span>
<span>我是span标签</span>
<p>我是p标签</p>
<p>我是p标签</p>
<p class="yi"><span>
我是p-sapn标签
</span></p>
<h3>我是h3</h3>
<b>我是b</b>
</body>
</html>
运行效果如下: