如何处理Internet Explorer? [英] How do you deal with Internet Explorer?

查看:132
本文介绍了如何处理Internet Explorer?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我知道这个主题可能还有其他问题。我想每个web开发人员都通过这个IE。

I am aware that there are probably other questions regarding this topic. I guess that every web developer goes through this with IE.

我正在开发一个完全基于Javascript的基于Web的应用程序。我是Mac用户。我真的很高兴,一切工作伟大的Safari,Firefox和歌剧。然后我问一个朋友用Windows检查它与Internet Explorer,事情不工作,以及。我的应用程序对HTML标准非常敏感。

I am developing a web-based application fully based on Javascript. I am a Mac user. I was really happy that everything worked great in Safari, Firefox and Opera. I then asked a friend with Windows to check it with Internet Explorer, and things don't work as well. My application is very sensitive to the HTML standards.

主要的问题是CSS布局。由于jQuery的可移植性,JavaScript本身似乎工作正常。

The main problem is the CSS layout. The JavaScript itself seems to be working properly thanks to jQuery for portability.

如何处理Internet Explorer?我应该创建一个只加载在Internet Explorer上的新CSS?我应该为Internet Explorer创建新版本的应用程序吗?你如何正常处理这个?

How do you deal with Internet Explorer? Should I create a new CSS that is only loaded on Internet Explorer? Should I create a new version of the application only for Internet Explorer? How do you normally handle this? The application is pretty big both in feature design and in layout design.

使用由Nosredna建议的CSS重置,已经删除了几乎一半的问题。我想这真的是一个好的做法。我注意到SO也使用它。

Using the CSS reset as suggested by Nosredna, already removed almost half of the problems. I guess it really is a good practice. I noticed that SO also uses it.

推荐答案

你指定一个有效的doctype吗?通过将Internet Explorer切换到标准模式,您可以使Internet Explorer更加合规。 http://msdn.microsoft.com/en-us/library/ bb250395.aspx#cssenhancements_topic2

Do you specify a valid doctype? You can get Internet Explorer to be a bit more compliant by switching it into standards mode. http://msdn.microsoft.com/en-us/library/bb250395.aspx#cssenhancements_topic2

您是否使用浏览器重置CSS文件?这可以帮助将版本结合在一起。 http://meyerweb.com/eric/tools/css/reset/

Do you use a browser reset CSS file? That can help bring the versions together. http://meyerweb.com/eric/tools/css/reset/

请注意IE的CSS错误: http:/ /www.positioniseverything.net/explorer.html

Be aware of IE's CSS bugs: http://www.positioniseverything.net/explorer.html

对于布局的骨架,请考虑使用已知工作的标记,例如 http://matthewjamestaylor.com/blog/perfect-multi-column-liquid-layouts a>或 http://960.gs/ 分别用于液体或固定布局。

For the skeleton of your layout, consider using markup that is known to work, such as http://matthewjamestaylor.com/blog/perfect-multi-column-liquid-layouts or http://960.gs/ for liquid or fixed layouts, respectively.

跟踪浏览器之间的JavaScript差异。 jQuery处理其中的一些,但不是所有的。 http://www.impressivewebs.com/7-javascript-differences -between-firefox-ie /

Keep up with JavaScript differences between browsers. jQuery handles some of them, but not all of them. http://www.impressivewebs.com/7-javascript-differences-between-firefox-ie/

是的,IE是一个痛苦。如果你希望它在IE中工作,你真的想每隔几天在IE上测试。你不想拯救痛苦的最后 - 你想一次处理一个恶梦。

Yeah, IE is a pain. If you want it to work in IE, you really want to test in IE every couple days. You don't want to save the pain for the end--you want to handle the nightmares one at a time.

顺便说一下,如果你认为IE是一种痛苦,请尝试用手机看你的页面。有一天,我用一个iPhone去REI.com,中间五分之一或更多的屏幕被一堆乱码标记呈现为文本。

By the way, if you think IE is a pain, try looking at your page with a mobile phone. The other day I went to REI.com with an iPhone and the middle fifth or more of the screen was taken up by a bunch of garbled markup that rendered as text.

这篇关于如何处理Internet Explorer?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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