Home > Web Front-end > HTML Tutorial > Tips for disabling compatible view modes of IE8 and IE9 using HTML_HTML/Xhtml_Webpage Production

Tips for disabling compatible view modes of IE8 and IE9 using HTML_HTML/Xhtml_Webpage Production

WBOY
Release: 2016-05-16 16:39:04
Original
1365 people have browsed it

Starting from IE 8, IE has added a compatibility mode. When turned on, it will render with a lower version of IE. But sometimes this will cause problems with the web page, so we usually add the following code in html to make IE use a fixed rendering mode:

Copy code
The code is as follows:




But I encountered a situation. In IE8, the page can be displayed normally only if the compatibility mode is not used. However, if it is set to IE8 mode, CSS3 will become invalid in IE9. It seems that I need to disable compatibility mode for IE8 and IE9 respectively. What to do? The browser version can be determined in the background. If it is IE8, content="IE=8" will be output. If it is IE9, content="IE=9" will be output. But this cannot be achieved with html. In fact, you can simply use the following code to achieve it:

Copy the code
The code is as follows:


Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template