推荐一个精美的 IE 浏览器兼容性提示弹窗,支持中文 - V2EX
V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
Kamato
V2EX    前端开发

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

  •  
  •   Kamato
    panteng 2016-01-28 17:53:56 +08:00 3595 次点击
    这是一个创建于 3548 天前的主题,其中的信息可能已经有所发展或是发生改变。

    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.

    Screenshot

    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

    • img-path:
      IE-Blocker uses some images to display browser icons. By default, IE-Blocker will look for these images in the img folder which locates at the same path of ie-blocker.js.
      So if you want to place these images somewhere else, you need to add an attribute img-path to script tag. For example:

      <!--[if lte IE 8]> <link rel="stylesheet" href="ie-blocker/ie-blocker.css"> <script src="ie-blocker/ie-blocker.js" img-path="../images/browser_icons/"></script> <![endif]--> 

      Remember the img-path is relative to ie-blocker.js, not the html file.
      Do not forget the '/' at the end.

    License

    MIT

    第 1 条附言    2016-01-29 10:44:47 +08:00

    中文版截图

    Screenshot

    1 条回复    2016-01-28 18:12:30 +08:00
    aivier
        1
    aivier  
       2016-01-28 18:12:30 +08:00
    我也做了一个,代码比较烂,用的人不多
    关于     帮助文档     自助推广系统     博客     API     FAQ     Solana     5523 人在线   最高记录 6679       Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 24ms UTC 08:01 PVG 16:01 LAX 01:01 JFK 04:01
    Do have faith in what you're doing.
    ubao msn snddm index pchome yahoo rakuten mypaper meadowduck bidyahoo youbao zxmzxm asda bnvcg cvbfg dfscv mmhjk xxddc yybgb zznbn ccubao uaitu acv GXCV ET GDG YH FG BCVB FJFH CBRE CBC GDG ET54 WRWR RWER WREW WRWER RWER SDG EW SF DSFSF fbbs ubao fhd dfg ewr dg df ewwr ewwr et ruyut utut dfg fgd gdfgt etg dfgt dfgd ert4 gd fgg wr 235 wer3 we vsdf sdf gdf ert xcv sdf rwer hfd dfg cvb rwf afb dfh jgh bmn lgh rty gfds cxv xcv xcs vdas fdf fgd cv sdf tert sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf shasha9178 shasha9178 shasha9178 shasha9178 shasha9178 liflif2 liflif2 liflif2 liflif2 liflif2 liblib3 liblib3 liblib3 liblib3 liblib3 zhazha444 zhazha444 zhazha444 zhazha444 zhazha444 dende5 dende denden denden2 denden21 fenfen9 fenf619 fen619 fenfe9 fe619 sdf sdf sdf sdf sdf zhazh90 zhazh0 zhaa50 zha90 zh590 zho zhoz zhozh zhozho zhozho2 lislis lls95 lili95 lils5 liss9 sdf0ty987 sdft876 sdft9876 sdf09876 sd0t9876 sdf0ty98 sdf0976 sdf0ty986 sdf0ty96 sdf0t76 sdf0876 df0ty98 sf0t876 sd0ty76 sdy76 sdf76 sdf0t76 sdf0ty9 sdf0ty98 sdf0ty987 sdf0ty98 sdf6676 sdf876 sd876 sd876 sdf6 sdf6 sdf9876 sdf0t sdf06 sdf0ty9776 sdf0ty9776 sdf0ty76 sdf8876 sdf0t sd6 sdf06 s688876 sd688 sdf86