一部CSS兼容所有浏览器 [英] One CSS compatible to all browser

查看:111
本文介绍了一部CSS兼容所有浏览器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

仅需说明一下,我发现有一篇文章说我必须为每个浏览器创建CSS文件.是唯一的方法,还是所有浏览器只能使用一个CSS.

-在此先感谢

Just want to make clear, I found an article saying that I must create CSS file for every browser. Is that the only way or Can I have only one CSS for all browser.

- Thanks in advance

推荐答案

是的,在特殊情况下.不错的主意.这完全取决于您要使用的功能集以及设计对浏览器之间差异的容忍度.

此外,在某些情况下,将多个属性放在同一CSS中是编写跨浏览器样式的有效技术.例如,考虑一个流行的功能:圆角.查看这篇文章: http://www.css3.info/preview/rounded-border/ [ ^ ],请注意跨浏览器示例"部分.您可以看到,具有不同名称的同一个属性是不同的HTML布局引擎.该技术正在全部使用它们.匹配的属性名称已由适当的浏览器使用,所有其他属性都将被忽略.

我个人更喜欢单个CSS槽严格简化的设计,这使得浏览器之间的区别不重要.与如今在Web上占据主导地位的网站的过度装饰和不够稳定的设计和布局相比,这种简单的设计非常出色.切记:网站因其功能,易于访问和内容而受到重视.但是,我不想深入研究一个非常不同的领域-工业设计.您可以找到自己的样式并建立自己的表达工具面板.

祝你好运,
—SA
Yes, in special cases. Not a bad idea. It totally depends on the set of features you want to use and the tolerance of your design to the difference between browsers.

Besides, in some cases putting several properties in the same CSS is a valid technique to write a cross-browser style. For example, consider a popular feature: rounded corners. Look at this article: http://www.css3.info/preview/rounded-border/[^], pat attention to the section "Cross Browser Examples". You can see that the same property has different name is different HTML layout engine. The technique is using them all. The matching property name is used by appropriate browser, all others are ignored.

I personally prefer a single CSS trough strict simplistic design which makes the difference between browser non-critical. Such simplistic design stands out pretty well compared to over-decorated and insufficiently stable design and layout of Web sites dominating the Web these days. Remember: Web site is valued for its functionality, ease of access and content. However, I don''t want to delve too deep into a very different field — industrial design. You can find your own style and establish your own palette of expressive tools.

Good luck,
—SA


这篇关于一部CSS兼容所有浏览器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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