Solve the Problem of IE compatibility mode, ie compatibility mode

Source: Internet
Author: User

Solve the Problem of IE compatibility mode, ie compatibility mode
The IE browser has added the compatibility mode since IE8. After enabling the mode, it will be rendered with an earlier version of IE. When you browse a webpage, the webpage is displayed, so you can add the following code in html to make IE use a Fixed rendering mode:

<Metahttp-equiv = "X-UA-Compatible" content = "IE = 8"> <! -- Rendering in IE8 mode -->
<Metahttp-equiv = "X-UA-Compatible" content = "IE = 7"> <! -- Rendering in IE7 mode -->

In another case, only the incompatible mode page in IE8 can be displayed normally, but if it is set to IE8 mode, CSS 3 will become invalid in IE9. It seems that the compatibility mode must be disabled for IE8 and IE9 respectively. What should we do? You can determine the browser version in the background. For IE8, content = "IE = 8" is output, and for IE9, content = "IE = 9" is output ". In fact, it can also be implemented simply through HTML. the HTML code is as follows:

<Metahttp-equiv = "X-UA-Compatible" content = "IE = 9; IE = 8; IE = 7; IE = EDGE">

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.