<span class="bigsize stress">胆小如鼠</span> 与 <span class="stress bigsize">胆小如鼠</span>效果一样
生效顺序与css中样式价值顺序有关,与class list中顺序无关
<!DOCTYPE HTML> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <title>css</title> <style type="text/css"> .colorred{color:red;} .colorgreen{color:green;} </style> </head> <body> <p><span class="colorred colorgreen">colorred colorgreen</span></p> <p><span class="colorgreen colorred">colorgreen colorred</span></p> </body> </html>
执行下这个代码就知道了,都是green的