有没有一个程序或框架,允许建立跨浏览器兼容的html和CSS代码? [英] is there a program or a framework which allows to build cross browser compatible html and css codes?

查看:97
本文介绍了有没有一个程序或框架,允许建立跨浏览器兼容的html和CSS代码?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我知道有像dreamweaver这样的程序,但是在创建自动的跨浏览器兼容的html和css代码时,没有一个成功。

I know there are programs like dreamweaver but none of them has significant success when it comes to creating automatic cross browser compatible html and css codes.

我想知道,是否有一个框架或程序可用于创建更多跨浏览器兼容的HTML和CSS布局?

I was wondering, is there a framework or program that i can use for creating more cross browser compatible HTML and CSS layout ?

目前,我使用在vmware上运行的虚拟Windows XP版本来检查IE6中的网页外观,并手动使用Chrome,Firefox,Opera和Safari。

Currently, i am using a virtual windows xp version running on vmware to check how web pages looks in IE6, and manually using Chrome, Firefox, Opera and Safari.

推荐答案

你想要的并不像许多人所说的真的存在。我试图通过有意识地使用已经证明被广泛支持,我有良好的经验的东西,确保自己最大的麻烦你描述。
完美的解决方案不存在,但这里有一些事情可以让你的生活更容易:

What you want doesn't really exist as many have said. I do try to safe myself most of the hassle you describe by consciously using only things that have proven to be widely supported and with which I have good experiences. The perfect solution doesn't exist but here are a few things to consider that could make your life easier:


  • 使用 css重置,因此所有默认浏览器样式都已删除。

  • 强制自己撰写HTML,以便针对某个doctype 验证。个人我只使用
    XHTML 1.1(这是非常严格的),但在大多数浏览器中具有高兼容性。

  • 仅使用常见的字体并得到广泛支持。

  • 限制您使用javascript绝对必要,请尽可能使用 jQuery ,因为它会常常为您解决差异。 (由Andrew Barber推荐)

  • Use a css reset so all default browser styles are gone.
  • Force yourself to write HTML that validates against a doctype. Personally I use only XHTML 1.1 (which is very strict) but gives high compatibility in most browsers.
  • Use only fonts that are common and widely supported.
  • Limit your use of javascript to the absolutely necessary, and use jQuery where you can, as it will "often iron out differences for you". (suggested by Andrew Barber)

这样,您最终可以获得与浏览器兼容性极高的网站

This way you'll end up with web sites that have a very high chance to be cross browser compatible

这篇关于有没有一个程序或框架,允许建立跨浏览器兼容的html和CSS代码?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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