简体   繁体   中英

Foundation 5 is not working with IE8

I am using Foundation 5 that working fine with all browser except IE8. I have also try with polyfill but still css issues exist on IE8. Any other solution for this.

For some businesses it is not a viable option to drop support for IE8. I had to get a Foundation 5 site working in IE8 and here are the steps I took to get it working.

Breakdown:

  1. Use jQuery v1.x and not v2.x
  2. Include IE8 grid support CSS
  3. Include shims in HEAD after your CSS
    • cdnjs.cloudflare.com/ajax/libs/html5shiv/3.6.2/html5shiv.js
    • s3.amazonaws.com/nwapi/nwmatcher/nwmatcher-1.2.5-min.js
    • html5base.googlecode.com/svn-history/r38/trunk/js/selectivizr-1.0.3b.js
    • cdnjs.cloudflare.com/ajax/libs/respond.js/1.1.0/respond.min.js
    • github.com/es-shims/es5-shim - shim.js
  4. Include Foundation js fix before initiating foundation
  5. Include REM shim at very bottom of page

For a more in depth look at how to do this check out the link below:

https://kyco.io/blog/getting-foundation-5-to-work-in-ie8

According to http://foundation.zurb.com/learn/faq.html and http://foundation.zurb.com/docs/compatibility.html :

  1. Why doesn't Foundation support IE7 or IE8? Or: why we don't support a dying species.

This is probably the biggest question we get. Consider this: most of today's popular browsers automatically upgrade themselves including Chrome, Firefox and Explorer (starting with 9). IE 8 is the last IE supported on Windows XP, which Microsoft will officially stop supporting next year. That played a part in our decision.

Besides that, since Foundation 4, our framework is built mobile-first, meaning it relies on media queries to layer in more complex layouts and components. Browsers or devices that don't support media queries will be restricted to a simple, single-column layout. In some ways, Foundation 4 better supports IE6-7 insomuch as it provides a mobile but not entirely broken experience. If IE8 support is important for your users / customers, you can use Foundation 3.2, which supports IE8. It's not mobile first but it's good stuff.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM