简体   繁体   English

是否有一个javascript库来修复IE渲染错误?

[英]Is there a javascript library to fix IE rendering bugs?

Our website looks great in all browsers except IE 6-8. 我们的网站在IE 6-8以外的所有浏览器中都很棒。 We're not even using many CSS3 features. 我们甚至没有使用很多CSS3功能。 These are just plain old IE rendering bugs (like margins and padding). 这些只是普通的旧IE渲染错误(如边距和填充)。 Before trying to apply a bunch of IE specific fixes, I was wondering if anyone knows of a javascript library that I could apply to fix a bunch of these typical bugs? 在尝试应用一堆IE特定修复程序之前,我想知道是否有人知道我可以应用于修复一堆这些典型错误的javascript库?

Update: Like I mentioned, we're not necessarily using any "modern" CSS3 features nor HTML5, so these are just typical IE 8 bugs where IE renders things differently than all the other browsers. 更新:就像我提到的,我们不一定使用任何“现代”CSS3功能,也不一定使用HTML5,所以这些只是典型的IE 8错误,其中IE呈现的方式与所有其他浏览器不同。

Go for excellent normalize.css reset that takes care of most of it (also used by HTML5 Boilerplate ) 寻求优秀的normalize.css重置来处理大部分内容(也由HTML5 Boilerplate使用

Normalize.css is a customisable CSS file that makes browsers render all elements more consistently and in line with modern standards. Normalize.css是一个可自定义的CSS文件,它使浏览器更加一致地呈现所有元素并符合现代标准。 We researched the differences between default browser styles in order to precisely target only the styles that need normalizing. 我们研究了默认浏览器样式之间的差异,以便仅精确定位需要规范化的样式。

As for getting support of CSS3 for browsers that don't support it, check out CSS3Pie 至于不支持CSS3的浏览器支持CSS3,请查看CSS3Pie

You don't need JavaScript; 你不需要JavaScript; just use a CSS reset file: http://yuilibrary.com/yui/docs/cssreset/ 只需使用CSS重置文件:http: //yuilibrary.com/yui/docs/cssreset/

That will work across most browsers to not only fix IE issues, but also make your site render more uniformly over different browsers. 这将适用于大多数浏览器,不仅可以解决IE问题,还可以使您的网站在不同的浏览器上更加统一。

您可能想看看这个: https//code.google.com/p/ie7-js/或者: https//code.google.com/p/html5shiv/

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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