基础选择器

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Title</title>

<style>
/*通用选择器 */
*{
font-size:45px;
}
/* 标签选择器 */
p{
background-color: #2eb1fc;
}
/* id选择器 */
#p1{
font-style: italic;
}
/*class 选择器*/
.c1{
background-color: red;
}

</style>
</head>
<body>
<p>helloo star</p>
<div>hello china
<span>hello span</span>
<p id="p1">p2..............</p>
<p class="c1">c1...............</p>
<p class="c1">c1....</p>
</div>
<div class="c1">hello throne</div>
</body>
</html>
posted @ 2020-01-05 17:00  Stary_tx  阅读(514)  评论(0编辑  收藏  举报