笔记
谁控制的越精确,谁的优先级越高
标签名:整个标签
CLASS:相同的类型
ID:一个id名称
内联样式表>ID选择器>类选择器>标签选择器
内联样式表>内部样式表?外部样式表
练习
1 .代码
<DOCTYPE html>
<html>
<head>
<title>hello</title>
<meta charset="utf-8">
<style>
.div_1{
height:100px;
width:100px;
background-color:red;
}
.div_2{
height: 100px;
width: 200px;
background: orange;
}
.div_3{
height: 100px;
width: 300px;
background: yellow;
}
.div_4{
height: 100px;
width: 400px;
background: green;
}
.div_5{
height: 100px;
width:500px;
background: #9CF;
}
.div_6{
height:100px;
width: 600px;
background: blue;
}
</style>
<head>
<body>
<div class="div_1"></div>
<div class="div_2"></div>
<div class="div_3"></div>
<div class="div_4"></div>
<div class="div_5"></div>
<div class="div_6"></div>
</body>
<html>