<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title>基本选择器</title>
<style type="text/css">
/* 1,通配符选择器*/
* {
margin: 0;
padding: 0;
}
/* 2, 标签(元素)选择器: 查找的是页面中所有 该种类型的 标签*/
p{
color: sienna;
font-size: 50px;
background-color: brown;
};
/* 3, 类(class)选择器*/
.oneDiv{
font-size: 70px;
}
.ok{
color: aquamarine;
}
/* 4, id 选择器 */
#不Div{
background-color: deeppink;
height: 100px;
}
/* 5, 群组选择器 */
p, .oneDiv,#不Div,{
}
</style>
</head>
<body>
<p>早上你饿不饿</p>
<div class="oneDiv">
说一个神话,大家都知道,他的名字叫哪吒
</div>
<!--
元素(标签)可以拥有多个class值
多个class之间用空格间隔开
-->
<p class="oneDiv ok">我吃了,你没吃吧,哈哈!</p>
<div id="不Div">
好郁闷无聊啊 苍天已死 黄天当立
</div>
</body>
</html>