<html xmlns="http://www.w3.org/1999/xhtml"> <head runat="server"> <title></title> <style type="text/css"> div.tc{ background-color:Orange;} .tc{ background-color: Black;} div { background-color: Red; } #t1{ background-color:Purple;} </style> </head> <body> <div id="t1" class="tc"> afdasfdsafd </div> </body> </html>
得出的结论是: id > div.class > .class > div