推荐一个精美的 IE 浏览器兼容性提示弹窗,支持中文

2016-01-28 17:53:56 +08:00
 Kamato

GitHub 地址: https://github.com/panteng/ie-blocker

IE-Blocker

Block outdated Internet Explorer from your website and display a friendly message of upgrading to modern browsers.

Live Preview

Please visit the websites below with IE 6-9.

English Version

中文版本

Install

Install Manually

Simply download the latest version of IE-Blocker from this page. Unzip the file and place the ie-blocker folder into your projects.

Install Using Bower or Npm

Optionally, you can install IE-Blocker with Bower or Npm:

// With Bower
bower install ie-blocker

// With Npm
npm install ie-blocker

Usage

Manual Install

  1. Include ie-blocker.css and ie-blocker.js inside the <head> tag. Use conditional comments to make these codes only work in old version IE.

    <!--[if lte IE 8]>
    <link rel="stylesheet" href="ie-blocker/ie-blocker.css">
    <script src="ie-blocker/ie-blocker.js"></script>
    <![endif]-->
    
  2. Place the following html code before the closing <body> tag. You can find the full code in template.html. Use conditional comments to make these codes only work in old version IE.

    <!--[if lte IE 8]>
    <div id="ib-container">
        <div class="ib-modal">
            ...
        </div>
        <div class="ib-mask"></div>
    </div>
    <![endif]-->
    
  3. That's it.

Options

License

MIT

3039 次点击
所在节点    前端开发
1 条回复
aivier
2016-01-28 18:12:30 +08:00
我也做了一个,代码比较烂,用的人不多

这是一个专为移动设备优化的页面(即为了让你能够在 Google 搜索结果里秒开这个页面),如果你希望参与 V2EX 社区的讨论,你可以继续到 V2EX 上打开本讨论主题的完整版本。

https://www.v2ex.com/t/254054

V2EX 是创意工作者们的社区,是一个分享自己正在做的有趣事物、交流想法,可以遇见新朋友甚至新机会的地方。

V2EX is a community of developers, designers and creative people.

© 2021 V2EX