今天偶然发现的,class里的类选择器先后顺序已经不影响渲染的优先级了_(:3」∠)_ 先写text-danger再写active但还是按照样式里的先走active再走text-danger
下面这段代码hello color最后出来就是红色的∑(っ °Д °;)っ
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title></title>
<style>
.static{font-size:100px;}
.active{color:blue;}
.text-danger{color:red;}
</style>
</head>
<body>
<div class="static text-danger active">hello color</div>
</body>
</html>