同一个标签定义多个样式优先级问题

来源:互联网 发布:2017北京云计算大会 编辑:程序博客网 时间:2024/06/07 00:45

 style的优先级最高,然后是id,再来是class,最后才是td 另外,使用!important可以改变优先级别为最先。

#aaa{   background-color: Fuchsia;}.ab{   background-color: Black;}td{   background-color: Aqua ;}
<table><tr><td class="ab" id="aaa" style="height:200px;width:200px;background-color: Blue;"></td></tr></table>



原创粉丝点击