HTML5shiv vs Dean Edwards IE7-js vs Modernizr - which to choose?

前端 未结 3 1248
南方客
南方客 2020-11-28 18:23

I\'m looking to build my first HTML5 site and have been looking at working with IE.

There is html5shiv, Dean Edwards ie7-js and then Modernizr. Are these all largely

相关标签:
3条回答
  • 2020-11-28 18:38

    they are somewhat the same, and which way to go is ATM as good a guess either way, and for the record, there's one you missed, http://html5boilerplate.com/ This is sort of a repeat of some years ago when prototype and jQuery were fighting in the same space. I'd personally hazard that jQuery won but for now there's no telling which one of these will win this particular fight. I don't think I could recommend dean edwards ie7-js as it mostly deals with just getting IE7 to act like other more intelligent and likable browsers as opposed to leveraging the whole HTML5 thing as much as the other frameworks.

    0 讨论(0)
  • 2020-11-28 18:40

    No, they're not the same at all; they do completely different things.

    • html5shiv allows you to use the new HTML5 tags in versions of IE that don't understand them. Without it, IE will choke on these tags, so you need this if you intend to use the tags. Don't expect it to make the tags actually do anything in IE though! It just stop the browser complaining about them.

    • modernizr sets a bunch of classes in your HTML, depending on the available features, which you can use to change your layout according to what the browser supports. It also allows you to use the new HTML5 tags in IE, like html5shiv.

    • ie7.js (as well as ie8.js and ie9.js) uses Javascript to retro-fit some missing functionality to IE.

    As far as I'm aware there's no cross-over between them (aside from html5shiv/modernizr), so you can use any combination of them, depending on what features you need to implement.

    While I'm on the subject, and since you're asking about tools to make IE more compatible with other browsers, I suggest you also look into CSS3Pie, which will make your life much happier if you plan to use rounded corners on your site (plus one or two other features).

    This also has no cross-over with the other three products you mentioned, though they do all aim to make old versions of IE slightly easier to work with.

    0 讨论(0)
  • 2020-11-28 18:51

    Easiest way to start a new HTML5 project is using initializr. It will guide and let you build, download your HTML5 project files.

    0 讨论(0)
提交回复
热议问题