- It fixes many CSS issues and makes transparent PNG work correctly under IE5 and IE6.
- Check out this demo page for more details.
- Get the library via npm:
npm install -S ie7js
- There are 3 scripts:
IE9.js. They are backward compatible, which means the functionality that
IE8.jshas are included in
- IMPORTANT: These CSS hacks take NO effect on inline styles, but support both internal and external stylesheets.
- There are no other dependencies except for one file
- Check to see if your build workflow has required it correctly, or manually copy it with
IE9.min.jsto your asset folder under the same level directory.
- The script only fixes images named:
- 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:
- The suffix will ignore query string parameters. For more fine-grained control you can also set
IE7_PNG_SUFFIXto 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:
- Unfortunately, the transparent background image cannot be tiled (repeated) using
background-repeat. Nor can it be positioned using
Credits and Links
- This library is credited by Dean Edwards, the copy in this repo is of its last and latest version 2.1(beta4).
- I put it here in GitHub for the convenience of management by NPM and integration in your own build workflow.
- Original repo hosted on Google: https://code.google.com/archive/p/ie7-js/
- Google groups: https://groups.google.com/forum/#!forum/ie7-js
- Related posts: