兼容性

 

 
IE7.js是 一个JavaScript库,使微软互联网浏览器像一个标准兼容的浏览器。它修复许多 HTML和CSS问题,并提出下IE5和IE6的透明PNG正常工作

IE7.js

Upgrade MSIE5.5-6 to be 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 be compatible with MSIE8.

<!--[if lt IE 8]>
<script src="http://ie7-js.googlecode.com/svn/version/2.1(beta4)/IE8.js"></script>
<![endif]-->

You do not need to include IE7.js if you are using IE8.js

IE9.js

Upgrade MSIE5.5-8 to be compatible with modern browsers.

<!--[if lt IE 9]>
<script src="http://ie7-js.googlecode.com/svn/version/2.1(beta4)/IE9.js"></script>
<![endif]-->

You do not 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 apply 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 will 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 an alternative PNG solution then set the suffix to something that cannot possibly match:

var IE7_PNG_SUFFIX = ":";

By default, the PNG will 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) usingbackground-repeat. Nor can it be positioned using background-position.

Download

You may link directly to these files if you wish:

http://ie7-js.googlecode.com/svn/version/

Or go to the downloads section to download the current version.

Getting Started

Here is a nice introduction:

http://www.charlescooke.me.uk/web/lab_notes/ie7_script.html

Demo

http://ie7-js.googlecode.com/svn/test/index.html

posted @   G-Beniot  阅读(183)  评论(0编辑  收藏  举报
编辑推荐:
· AI与.NET技术实操系列(二):开始使用ML.NET
· 记一次.NET内存居高不下排查解决与启示
· 探究高空视频全景AR技术的实现原理
· 理解Rust引用及其生命周期标识(上)
· 浏览器原生「磁吸」效果!Anchor Positioning 锚点定位神器解析
阅读排行:
· DeepSeek 开源周回顾「GitHub 热点速览」
· 物流快递公司核心技术能力-地址解析分单基础技术分享
· .NET 10首个预览版发布:重大改进与新特性概览!
· AI与.NET技术实操系列(二):开始使用ML.NET
· 单线程的Redis速度为什么快?
点击右上角即可分享
微信分享提示