开发者

Can I expect similar CSS and JavaScript behavior with Chrome 5 on Windows and Mac

Chrome 5 was recently released for Windows, Mac, and Linux, all with the same version number. Are there significant differences in behavior (CSS or JS) between the different platforms, or do they behave pretty much the same?

I'm not interest开发者_开发问答ed in how they handle extensions -- just handling of HTML, CSS, and JavaScript.


The only thing to worry about are fonts, as these are (or may be) different or even unavailable on different platforms. The main problem that can arise from this is that fonts are wider or narrower than the ones for which the design was made, thus breaking some elements (for example, if the fonts are wider, certain text blocks will break onto more rows than intended, making the design look out of place; if the fonts are narrower, "gaps" might appear).

There are two solutions for this:

  1. Use a generic font family (such as sans-serif) and while designing take into account all platforms that you wish to support;
  2. Use @font-face, which is supported by all major browsers (except for IE) -- including Google Chrome. This way, you will be able to provide a fully consistent look across all platforms.

Other than the fonts issue, there's nothing to worry about. Both the layout engine (that takes care of HTML and CSS) and the JavaScript engine are the same across all platforms.


Useful resources for fonts:

  • @font-face - Mozilla Developer Center + most of the links in the See Also section of that page;
  • Google Font Directory - Google provides a nice API for using webfonts.
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜