#footer{width:500px;height:220px;background-color:Red}div.footer2{width:500px;height:220px;background-color:gray}
上面的div背景 最终将显示 内联样式style的 blue
如果去掉style属性
id="footer" class="footer2" >
将显示 id选择器 的 Red背景色
所以他们的关系是 内联Style>ID >Class;