Different browsers, such as Internet Explorer 6, Internet Explorer 7, and Mozilla Firefox, have different understandings of CSS parsing, which leads to different page effects, we cannot get the page effect we need.
At this time, we need to write different CSS for different browsers so that they can be compatible with different browsers at the same time, so that we can get the desired page effect in different browsers.
This process of writing different CSS codes for different browsers is called CSS hack.
CSS hack varies with different browsers:
Difference between IE6 and FF:
Background: orange; * background: blue;
Difference between IE6 and IE7:
Background: green! Important; background: blue;
Difference between IE7 and FF:
Background: orange; * background: green;
Difference FF, IE7, IE6:
Background: orange; * background: green! Important; * background: blue;
Note:
◆ IE can recognize *; standard browsers (such as FF) cannot recognize *;
◆ IE6 can recognize *, but cannot recognize it! Important,
◆ IE7 can recognize * and can also recognize! Important;
◆ FF cannot recognize *, but can recognize it! Important;
Add another underscore "_",
IE6 supports underlines, while IE7 and firefox do not.
So you can also distinguish IE6, IE7, and Firefox.
Background: orange; * background: green; _ background: blue;
Note: No matter what method, the order of writing is firefox's preface, IE7's writing in the middle, and IE6's writing at the end.