Standards mode in IE7 with HTML5?

筅森魡賤 提交于 2019-12-08 17:37:58

问题


Is there a way to trigger standards mode in IE7 when using the HTML5 doctype?

My document starts like this:

<!DOCTYPE html>
<html>
<head>
...

回答1:


F12 opens Developer Tools in IE 9. Alt+7, Alt+8, & Alt 9 will allow you to toggle between browser versions. There are also menus that allow you to change both document and standards modes.

A couple things:

If you are trying to view the DOM tree using the developer tools and switching between different versions in compatibility mode, you should know that you need to refresh each time you switch modes. Otherwise you won't be able to see the tree.

Also, these emulations are not exactly like the original browsers. It really is impossible to see "the way another browser would render" a page unless you are on that other browser.

I recommend using browsershots.org. It's free, and requires no download. If you want to get really sophisticated, there are other options. However I recommend browsershots. Just beware that it takes a few minutes to get a couple images back, and there is a maximum limit per day. You can raise that a bit by registering your account.




回答2:


Use <meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7"/> in the head section.



来源:https://stackoverflow.com/questions/5036315/standards-mode-in-ie7-with-html5

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!