If you have read the article "CSS ninja: Safe CSS hacks cheats" posted on mango xiaozhan, You should have understood the skills to replace CSS Hacks with IE conditional annotations. We have recently considered using this solution in projects.
Generally, three IE versions (IE6/7/8) are required for browser compatibility. Of course, more derivative versions will be available after IE9 is gradually pushed to the market. So now I only consider IE7 ~ Compatibility of version 9. The code for commenting on the involved conditions is as follows:
<! DOCTYPE html> <! -- [If lt IE 7]>
The usage instructions are as follows:
. Test {/* style for non-ie browsers */}. ie. test {/* style for all ie versions */}. ie6. test {/* style for ie6 */}.... ie9. test {/* style for ie9 */}
In the previous article, some people proposed using PHP to determine UA parameters and dynamically output style sheets. Although this method is concise and clear, it is coupled with the backend code, I think it is not the same thing. In many cases, the page is templated in actual applications, and dynamic output is not very suitable.
In addition, the domestic large dual-core high-speed Secure Shell browser has not been tested, this requires further understanding.