一个选择器可以作用于很多个标签上,
一个标签也会被很多个选择器作用.
!important 属性不能被继承
作用: 将对应选择器的优先级设置为最高级
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Document</title>
<style type="text/css">
#one{
color: pink;
}
.one{
font-style: italic;
color:blue;
}
div{
font-size: 30px ;
color:red !important;
}
body{
color: yellow ;
}
* {
color: purple ;
}
</style>
</head>
<body>
haha
<div class="father">
<div class="one" id="one">
abc
</div>
</div>
</body>
</html>