可移植CSS的规则是什么? [英] What are the rules for portable CSS?
问题描述
我是CSS的新手,要遵守的规则是什么,以确保CSS在其他浏览器中看起来一样? (我使用Firefox)。
对于IE7有什么具体规则吗?
我认为开始的地方是:
http://html5boilerplate.com/ (阅读注释的CSS)它规范了不同浏览器之间的CSS行为。 (我不会建议使用重置)。
请参阅 http://na.isobar.com/标准/ 来了解最佳前端最佳实践。
有一些规则doe使你的东西在IE 6& 7(这是唯一会导致你严重麻烦的):
-
当某些东西在IE6 /
-
z-index对旧的IE
有点棘手 -
请参阅 http://www.quirksmode.org/ 发展对于
-
工作原理的敏感性。尽量避免使用MS过滤器CSS ...(可以使您的网站呈现速度非常慢,并可能导致JS动画的意外行为)
>不要将超过32个CSS文件插入到您的html文件中(不要开玩笑) http://acidmartin.wordpress.com/2008/11/25/the-32-external-css-files-limitation-of-internet-探索者和更多/ )
I'm new to CSS, what are the rules to obey to make sure that CSS looks the same in other browsers? (I use Firefox).
P.S. Are there any specific rules for IE7?
I think the bast place to start is here: http://html5boilerplate.com/ (Read the Commented CSS.) Its normalizes the CSS behavior across the different browsers. (i would not recommend using a Reset).
Consult http://na.isobar.com/standards/ to get to know the best frontend best practices.
There are some rules doe to make your stuff work in IE 6 & 7 (does are the only ones that gonna cause you serious trouble):
When something does not work in IE6 / 7 try to set zoom: 1 before you try anything else
z-index is a little tricky on old IE's
make yout sites for for IE first then do the fancy stuff for the other browser (CSS3) its gonna save you a lot of trouble
Do not insert more then 32 CSS files to your html file (no joke ;) http://acidmartin.wordpress.com/2008/11/25/the-32-external-css-files-limitation-of-internet-explorer-and-more/ )
Consult http://www.quirksmode.org/ to develop e sensibility for what is working where
try to avoid MS filters in your CSS... (can make your site rendering very slowly and can lead to unexpected behavior with JS Animations )
这篇关于可移植CSS的规则是什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!