[HTML] Google Ie-x.js To resolve the conflict between IEX and the standard

Source: Internet
Author: User

If you use IE5, IE6, IE7 to browse the same Web page, you may see a different effect.
This is caused by different parsing selectors for CSS or errors and individual bugs. In order to resolve these errors and bugs.
We had to find a solution that could be balanced between them.
such as the PNG transparency problem can not show its effect under IE5, IE6, we may use CSS hack or introduce external JavaScript to implement. For example, I mentioned earlier that the method of using PngFix is to invoke external JavaScript to solve the PNG transparency problem in IE5 and IE6. There are, of course, more ways.
And now there is a more perfect way to be compatible with IE5, IE6, IE7 CSS selectors parsing a different problem. That is: Ie7–js
Ie7–js is a JavaScript library (the JS library that solves the conflict between IE and the Web Standard), making Microsoft's Internet Explorer behave like a website-compliant browser, supporting more standards and supporting CSS2, CSS3 selectors. It fixes a number of HTML and CSS issues and makes transparent PNG appear correctly in IE5, IE6.
Currently the IE7–JS version: 2.0 Beta 3
Usage:
Refer directly to the JS file on the Google Code server.

<!--[If Lt IE 7]>
<script src=http://up.2cto.com/2013/0222/20130222021950559.png ";</script>
<! [endif]-->
<!--[If Lt IE 8]>
<script src=http://up.2cto.com/2013/0222/20130222021951759.png ";</script>
<! [endif]-->
<!--[If Lt IE 9]>
<script src=http://up.2cto.com/2013/0222/20130222021951794.png ";</script>
<! [endif]->


Ie7.js
Upgrade the IE5, IE6 to compatible IE7
Note An IE browser that has an Internet Explorer version number below IE7 loads the code.
<!–[if LT IE 7]>
<script src= "http://ie7-js.googlecode.com/svn/version/2.0 (beta3)/ie7.js" type= "Text/javascript" ></ Script>
<! [endif]–>

Ie8.js
Enables IE5, IE6, IE7 to support more standards (many of the HTML and CSS issues have been fixed).
Note This code is loaded by IE, which has an Internet Explorer version number less than 8, while other standards-compliant browsers ignore the code and do not interfere with its work when the IE8 comes out.
<!–[if LT IE 8]>
<script src= "http://ie7-js.googlecode.com/svn/version/2.0 (beta3)/ie8.js" type= "Text/javascript" ></ Script>
<! [endif]–>

Make the PNG transparent statement.
<script src= "Ie8.js" >ie7_png_suffix= ". PNG";</script>

E7.js is a JavaScript library to make Microsoft Internet Explorer behave like a standards-compliant browser. IT fixes many HTML and CSS issues and makes transparent PNG work correctly under IE5 and IE6.
Status
Current version:2.1 beta4.
Usage
Ie7.js
Upgrade msie5.5-6 to is compatible with MSIE7.
<!--[If Lt IE 7]>
<script src= "http://ie7-js.googlecode.com/svn/version/2.1 (beta4)/ie7.js" ></script>
<! [endif]-->
Ie8.js
Upgrade msie5.5-7 to is compatible with MSIE8.
<!--[If Lt IE 8]>
<script src= "http://ie7-js.googlecode.com/svn/version/2.1 (beta4)/ie8.js" ></script>
<! [endif]-->
Need to include ie7.js if you are using Ie8.js
Ie9.js
Upgrade Msie5.5-8 to is compatible with modern browsers.
<!--[If Lt IE 9]>www.2cto.com
<script src= "http://ie7-js.googlecode.com/svn/version/2.1 (beta4)/ie9.js" ></script>
<! [endif]-->
Need to include ie7/ie8.js if you are using Ie9.js
Png
The script only fixes images named: *-trans.png
If you want the "fix to" to "all" PNG images then set a global variable as follows:
var ie7_png_suffix = ". PNG";
You must set this variable before including the Ie7.js script. Alternatively, you can set the variable inside the ie7.js script element:
<script src= "Ie8.js" >ie7_png_suffix= ". PNG";</script>
The suffix would ignore query string parameters. For more fine-grained control you can also set Ie7_png_suffix to a RegExp object. If you want to use a alternative PNG solution then set the suffix to something that cannot possibly match:
var ie7_png_suffix = ":";
By default, the PNG would be stretched (this simulates tiling). If you want to turn this off then set the No-repeat property as follows:
Div.example {
Background:url (my-trans.png) no-repeat;
}
Unfortunately, the transparent background image cannot be tiled (repeated) using Background-repeat. Nor can it be positioned using background-position.

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.