了解CSS选择器的优先级/特殊性
CSS
div { background-color:red; } div.my_class { background-color:black; } div#my_id { background-color:blue; } body div { background-color:green; } body > div { background-color:orange; } body > div#my_id { background-color:white; } <html> <body> <div id="my_id" class="my_class">hello</div> </body> </html>
慕的地10843
蝴蝶不菲