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

查看:21
本文介绍了是否有允许构建跨浏览器兼容的 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.我个人只使用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天全站免登陆