演示代码:
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title></title>
<link rel="stylesheet" type="text/css" href="reset.css"/>
<style type="text/css">
#wyzx2{
color: blue;
}
.wyzx1{
color: green;
}
p{
/* color: red; */
color: red!important;/* 只提升一条语句的优先级,不提升选择器优先级 */
}
</style>
</head>
<body>
<p class="wyzx1" id="wyzx2">我要自学</p>
</body>
</html>