问题

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!?

回答1:

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!

回答2:

I would recommend you use only what you need. Build your app in a browser that supports the features you are using, and periodically test in other browsers that you support. If something isn't working correctly, find the appropriate fix, whether it be html5shiv, IE9.js, Modernizr, or CSS3 Pie. You are not going to use all of the new features in HTML5 and CSS3 all in one page, so you don't need to include every polyfill library in existence. Wait until you find problems with the features you're trying to use, then try and find the library necessary to do that.

回答3:

I've used mainly CSS3Pie...it works great. But this afternoon i tested it on my laptop with I.E8 and there was an problem with it...it was disabling some css lines...when i removed the css3pie code my site gained twice the speed...then i came accross the posts with people arguing about the css3 slowdown...So at the moment i'm busy to find another way for IE7 & IE8 to have border-radius and shades.

If you want to use it...please test alot as it is NON-official fixes

来源:https://stackoverflow.com/questions/5667076/modernizr-html5shiv-ie7-js-and-css3-pie-which-to-use-and-when

html5shiv.js css3,Modernizr, html5shiv, ie7.js, and CSS3 Pie. Which to use and when?相关推荐

  1. html5怎么兼容js 插件,Modernizr.js入门指南(HTML5CSS3浏览器兼容插件)

    HTML5 和 CSS3 的快速发展,给我们带来了极大的便利,比如从此再也不用花费大量的时间只是为了设计一个圆角的效果. 但是!我们不能像控制机器一样来控制所有的人都一夜之间升级到现代浏览器,因为那些 ...

  2. 解决IE5、IE6、IE7与W3C标准的冲突(IE7.js IE8.js)

    如果分别用IE5.IE6.IE7浏览同一个网页,将可能出现不一样的效果. 这是它们之间对CSS的解析选择器不一样或错误和个别bug所导致.为了解决这些错误和bug. 我们不得不找到一个能平衡于它们之间 ...

  3. 谷歌的ie9.js ie8.js ie7.js 解决IE5、IE6、IE7、IE8与W3C标准的冲突

    http://code.google.com/p/ie7-js/ 如果分别用IE5.IE6.IE7浏览同一个网页,将可能出现不一样的效果. 这是它们之间对CSS的解析选择器不一样或错误和个别bug所导 ...

  4. js库Modernizr的介绍和使用

    Modernizr是一个开源的JS库,它使得那些基于访客浏览器的不同(指对新标准支持性的差异)而开发不同级别体验的设计师的工作变得更为简单 传统浏览器目前不会被完全取代,令你难以将最新的 CSS3 或 ...

  5. IE7.JS解决IE兼容性问题方法

    转自:http://code.google.com/p/ie7-js/ 使IE5,IE6兼容到IE7模式(推荐) <!--[if lt IE 7]> <script src=&quo ...

  6. 纯CSS3口袋妖怪弹跳球js特效

    下载地址 纯CSS3口袋妖怪弹跳球特效,css3基于@keyframes绘制神奇宝贝球,弹跳的圆形球元素动画. dd:

  7. 让IE6/IE7/IE8支持CSS3的8种方法

    我们都知道,IE浏览器暂不支持CSS3的一些属性.国外的工程师们,不安于此现状,他们总是尽量使用一些手段使IE浏览器也能支持CSS3属性,我觉得这些都是很有意义,很有价值的工作,可以推动整个技术领域的 ...

  8. calc ie支持_让IE6/IE7/IE8支持CSS3属性的8种方法介绍

    让IE6/IE7/IE8支持CSS3属性的8种方法介绍 发布时间:2013-09-23 10:43:06   作者:佚名   我要评论 IE浏览器暂不支持CSS3的一些属性.国外的工程师们,不安于此现 ...

  9. ie8 css占满剩余空间,让IE7 IE8支持CSS3 background-size属性

    简介 CSS3 新增的 background-size 是一个很有用的属性,用于定义背景图片的尺寸,有了这个属性,你就可以任意指定背景图片的大小.其中最常用的值应该要数 cover 了,该值能让背景图 ...

最新文章

  1. iOS crash 崩溃问题的追踪方法
  2. php cookie expires,php cookie类(设置、获取、删除cookie值)
  3. java移动文件导致tomcat死掉_原 netty导致tomcat假死
  4. 分类 迁移学习_迁移学习时间序列分类
  5. 基于OpenCV的计算机视觉入门(5)图像美化(上)
  6. Rainboy 的ASII码表
  7. Linux命令之udhcpc,自动获取IP地址
  8. MCS-51单片机的外部引脚及片外总线
  9. 解决visio中插入符号出现乱码
  10. 腾讯云数据迁移工具解决方案:华为云迁移到腾讯云
  11. WASCE (基于geronimo ) 配置
  12. muduo网络库:05---线程同步精要之(线程安全的Singleton实现)
  13. 利用特性、泛型、反射生成sql操作语句(待修改
  14. Libero Soc 安装和License申请
  15. 下载网页blob视频
  16. 关于laravel 使用__call,__callStatic实现静态,动态方法互相调用
  17. HTML网页黑白滤镜
  18. 大连理工版小学计算机教案,大连理工版小学信息技术教案
  19. 配置Microsoft SQL Server安装,win7,win10
  20. android2019开源框架

热门文章

  1. lock mysql unlock_MySql中Lock命令和unlock命令
  2. java oracle executeupdate 无效_Java语言的品味(三)
  3. JDWP Transport dt socket failed to initialize
  4. 计算机英语讲课笔记(2020-6-23)
  5. 大数据学习笔记09:MapReduce概述
  6. SDOI2017R2PKUSC2017
  7. bzoj1228 [SDOI2009]ED 找规律
  8. 三维旋转四元数系列(1.复数与二维旋转)
  9. JavaScript 数组拼接打印_JavaScript数组_创建数组_一维数组_length(二十三)
  10. 向iOS开发者介绍C++