Compatibility issues with different versions of IE

Source: Internet
Author: User

As a front-end developer, there are many contacts with IE. This everybody knows, I also don't say more. It's been used today (more recently on IE6 's compatibility write),

So I decided to summarize the usual compatibility collections. Below I summed up some of the hack under IE:

_ IE6 Exclusive
* Ie6,ie7
/ IE8
\9 IE8, 9

The hack used in conjunction with @media are as follows:

@media \0screen\,screen\9 ie6,7,8
@media IE8

Another: compatible support for the fixed attribute under IE6:

. fixitem{

position:fixed;

_postion:absolute;

bottom:0;

_bottom:auto;

right:20px;

_top:expression (eval (document.documentelement.scrolltop+ document.documentelement.clientheight-this.offsetheight-(parseint (this.currentstyle.margintop,10) | | 0)-(parseint (this.currentstyle.marginbottom,10) | | 0)));
}

IE6 to fixed on the top of the Compatible

. fixitem{

_position:absolute;

_bottom:auto;

_top:expression (eval (document.documentElement.scrollTop));

}

When using the above expression, we will find that when scrolling the scroll bar under IE6, the element fixed in the top part of the browser will have a flashing effect, in order to avoid this flicker effect, add the code in the CSS:

*html{

Background-image:url (About:blank);

background-attachment:fixed;

}

These are my current use of more hack, not too full, first write so much, after the completion of the later.

Compatibility issues with different versions of IE

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.