Modernizr,html5shiv,ie7.js和CSS3 Pie。要使用哪个和何时? [英] Modernizr, html5shiv, ie7.js, and CSS3 Pie. Which to use and when?

查看:129
本文介绍了Modernizr,html5shiv,ie7.js和CSS3 Pie。要使用哪个和何时?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我刚刚开始在我的文档中使用HTML5和CSS3。
我理解需要JavaScript来使IE浏览器适应这些新的标签和样式,但我不知道该使用哪个以及何时使用!



我的计划是使用html5shiv和IE9.js来管理HTML5标签以及透明的png(以及他们修复的其他任何麻烦的错误),然后引起我的注意Modernizr和CSS3 Pie。

我的问题是,如果我使用Modernizr,它是否会照顾我对html5shiv和IE9.js的需求?或者我应该包括这些吗?什么是重叠,如果有的话?

什么是CSS3派做Modernizr或其他人不?反之亦然?



我感谢你们的帮助。让我知道你做了什么!

每一年。



Modernizr



包括HTML5shiv功能
也可以更多 - 如果你不使用其他功能,那么不要使用它,它会减慢页面加载速度,但是如果你需要的话,它是值得的!



HTML5shiv



非常小,只需修复IE中的html5元素,别无其他。



CSS3PIE

允许您在旧版IE中使用边框半径,渐变和框阴影。也可以允许在IE 6中使用PNG。为页面加载增加了显着的延迟。



ie7.js(和ie9.js)



为您提供许多CSS3选择器,最小和最大宽度,多个类别和固定位置。如果你愿意,也可以有一个png修复。似乎并没有减慢速度。



结论

我的建议会分为两类:如果您只是使用新的(在互联网上是2年新的!)元素和CSS3选择器,则使用ie9.js + html5shiv。这是轻量级的,只是让你继续做事,而不必记住IE6不支持任何东西。



如果你使用了很多CSS3的东西,那么CSS3PIE将整理border-radius和box-shadow。渐变支持看起来有点片状,所以我一直使用后备图像。 Modernizr可让您轻松地为不同支持的浏览器提供不同的属性。我主要使用它来确定浏览器是否具有CSS转换和转换,因为它们对于任何图像滑块或内容轮播都很有用。值得使用自定义工具只包含你想要的功能 - webforms东西显示一个50个文本框,持续几毫秒,所以如果你不需要它就值得禁用。



希望有帮助!

I'm just starting to use HTML5 and CSS3 in my documents. I understand the need for JavaScript to bring Internet Explorer up to speed with these new tags and styles, but I don't know which to use and when!

My plan was to use html5shiv and IE9.js to look after the HTML5 tags as well as the transparent pngs (and whatever other pesky errors they fix) but then Modernizr and CSS3 Pie were brought to my attention.

My question is, if I use Modernizr, does it look after my need for html5shiv as well as IE9.js? Or should I include these as well? What is the overlap, if any?

And what does CSS3 Pie do that Modernizr or the others doesn't? Or vice versa?

I appreciate your guys help. Let me know what you do!?

解决方案

I've got extensive experience with all of these, having used them for a few years each.

Modernizr

Includes HTML5shiv functionality Also does a lot more – if you don't use the other features, then don't use it, it does slow down page loads, but is worth it if you need it!

HTML5shiv

Very small, just fixes html5 elements in IE, nothing else.

CSS3PIE

Lets you use border-radius, gradients and box shadow in older versions of IE. Also can allow PNGs in IE 6. Adds a noticeable delay to page load.

ie7.js (and ie9.js)

Gives you many CSS3 selectors, min and max width, multiple classes and fixed positioning. Also can have a png fix if you like. Doesn't seem to slow things down much.

Conclusion

My advice would fall into two categories:

If you are just using the new (is 2 years new on the internet?!) elements, and CSS3 selectors, then use ie9.js + the html5shiv. This is lightweight, and just lets you get on with things without having to remember that IE6 doesn't support anything.

If you are using a lot of CSS3 stuff, then CSS3PIE will sort out border-radius and box-shadow. The gradient support seems a little flaky, so I've always used a fallback image instead. Modernizr lets you easily deliver different properties to browsers with different support. I've mainly used this for determining whether a browser has CSS transitions and transforms, as they are useful for any image sliders or content carousels. It's worth using the customisation tool to only include the functionality that you want – the webforms stuff shows a textbox with 50 in it for a couple of milliseconds, so it's worth disabling if you don't want it.

Hope that's helpful!

这篇关于Modernizr,html5shiv,ie7.js和CSS3 Pie。要使用哪个和何时?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆