original:
http://www.cnblogs.com/justinyoung/archive/2009/04/03/kaifarenyuangongju2.html
In the previous article, the detailed explanation of the use of ie8 developer tools (detailed explanation of menus at all levels), we explained in detail how to use commands in each menu in the ie8 developer tools. I believe many friends should have used it. The more powerful features of ie8 developer tools, such as: how to test version compatibility, how to use developer tools to debug JavaScript scripts, and how to use profilers to detect page script function efficiency, etc., we will explain in this article. I'm stupid, I'm just throwing bricks here.
Browser ModeIn line with the saying of "Infernal Affairs" - I will pay it back sooner or later! . The bitter fruit planted by ie6 is indeed time to swallow it. When ie8 was released, he had to face the thousands of pages in the world that can only be displayed normally in ie6. If you don’t release ie8, firefox and Chrome will follow you to grab the cake; no matter those ie6 only pages, the browser will not be scolded to death; let all webmasters refactor the page, and think about it and laugh. Alas, what can I do?
Alas, with that, let us take a means to let the user handle it by themselves. If he encounters an ie6 only page, he will handle it manually by himself, and let the browser also render the page in the old rendering mode. Although this troubles the user a little, it is also a solution. So the browser mode comes out. To put it bluntly, it is to let the user choose which ie version of the current page to render.
Let’s give an example, and practice “Detailed Explanation of Conditional Comments of I” by the way. The core code is as follows:
<div id=divtest>
<!--[if ie 7]>
The browser is ie7
<![endif]-->
<!--[if ie 8]>
The browser is ie8
<![endif]-->
</div>
Let's try this page, display the effect in different browser modes:
For ordinary users, Microsoft officially recommends this thing - the compatibility view button.
Of course, for front-end developers, this tool is mainly used to test page multi-browser compatibility. But it is very regrettable: there is no ie6 mode. Although the world without ie6 is a beautiful wish, it’s a pity that we live in reality, perhaps it’s more accurate to live in hell. So, I still have to mention the following two tools-
Solutions for coexistence of multiple versions of ie-ietester
Superpreview (with download)