Very short .. But it is very important.
Browser priority: FF <IE7 <IE6, CSS hack write order is generally FF IE7 IE6
Take the "# Demo" style as an example;
# Demo { Width : 100px ; Height : 100px ; Border : 1px blue solid \ 0 }/* Executed by Firefox, IE6, and IE7 .*/
* html # demo { width : 100px ; height : 150px ; border : 3px green dotted }/ * will be executed by IE6, and the previous definition will be overwritten by later, so # The demo width is 120px in IE6; */
* + Html # demo{Width:100px;Height:300px;Border:1px red solid \ 9}/* Will be executed by IE7 */ "\ 0" IE8 identification, IE6, IE7 cannot, "\ 0" "\ 9" can distinguish all IE and Firefox.
---------------
So at last, # The height and border of the demo are explained in three browsers:
Ff and Google: 100px; no border
IE6: 150px; green, 3-pixel dotted border
IE7: 330px; red, 1-pixel solid border
IE8 and ie9: 100px; blue, 1 pixel solid border