本文介绍了是什么使CSS呈现在所有浏览器相同的最简单和最快的方法的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

制作一个网页显示正确的即时通讯今天所有主流浏览器是一个非常耗时的任务。

Making a web page display correctly im all major browsers today is a very time consuming task.

有没有一种简单的方法来使一个CSS样式,看起来完全相同的每一个浏览器?
或者至少,你有一些提示,以使这项工作更容易?

Is there a easy way to make a CSS style that looks identical in every browser? Or at least do you have some tips to make this work easier?

推荐答案

我同意所有的复位的建议和网格框架的建议,但我也想补充一点建议:在每个浏览器相同的的是,在实际应用中,无法实现,因为你无法控制客户端。案例:字体。

I agree with all the "reset" suggestions and the "grid" framework suggestions, but I did want to add a bit of advice: The goal of identical in every browser is, in practical terms, unachievable because you cannot control the client. Case in point: fonts.

您在声明你的CSS字体样式,但一些Linux的机器,一些Mac电脑,一些手机浏览器 - 不会有您指定的字体。这种变化会导致不同的文本长度和换行。此外,还有浏览器版本和运行的每个操作系统的变化;浏览器如何实现不同的缩放功能;和文字大小可以由最终用户来调整。相同的渲染仅仅是一个无法实现的目标。

You declare your font styles in CSS but some Linux machines, some Macs, some mobile browsers -- will not have the font you specified. This variation leads to differing text lengths and wrapping. Then there's the variance of browser versions and operating systems running each; how different browsers implement zoom features; and the text size can be adjusted by the end user. Identical rendering is simply an unachievable goal.

但采取心脏!这是CSS的艺术部分:能在你的设计灵活性,以便浏览器,操作系统,和最终用户调整之间的差异是优雅的处理。不要追求相同的渲染 - 你应该争取品牌一致性+适当经验+灵活性

But take heart! This is the "art" part of CSS: Being able to be flexible in your design such that variances between browsers, operating systems, and end-user adjustments are handled elegantly. Don't strive for identical rendering -- you should strive for brand consistency + appropriate experience + flexibility.

这篇关于是什么使CSS呈现在所有浏览器相同的最简单和最快的方法的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-29 11:54