一、关于Css兼容性的5个建议:http://approache.com/blog/css-cross-browser-compatibility-tips/
1、Reset styles to make consistent look in all browsers. Sample. Note: Most JS libraries (YUI, ExtJS etc) provide reset CSS rules.
2、Do not resize images via CSS/HTML because not all browsers do it well.
3、Do not use light font on dark background because of issues in Safari that causes other issues fixing this one.
4、Use only common fonts (Arial, Georgia, Verdana etc) because of different browsers and OS’s render it differently.
5、Size font in em through the page, but initialise in % for body. I’m not exactly sure about this, but the reason is that "The ability to resize text differs amongst browsers and OS’s".
6、All layout divs that are floated should include display:inline and overflow:hidden. This is due to IE doubles margins on the float side and IE 6 layout problems.
7、Carefully clear floats using overflow:auto or overflow:hidden. Be aware of issues. See Sample().
8、Use CSS selectors subset that all of your browser support. See browser CSS selectors support.
9、Do not use PNG transparency if you need to support IE 6.
二、关于如何设置字体大小:http://alistapart.com/article/howtosizetextincss
body {
font-size:100%;
line-height:1.125em; /* 16×1.125=18 */
}.bodytext p {
font-size:0.875em;
}.sidenote {
font-size:0.75em;
}
body标签用百分数定义字体大小;其他地方用em单位定义;
三、min-height如何在ie6下实现:http://www.educity.cn/gongju/1281455.html
四、如何写出兼容大部分浏览器的CSS: http://www.cnblogs.com/LoveJenny/archive/2012/08/27/2657930.html
1、Reset styles to make consistent look in all browsers. Sample. Note: Most JS libraries (YUI, ExtJS etc) provide reset CSS rules.
2、Do not resize images via CSS/HTML because not all browsers do it well.
3、Do not use light font on dark background because of issues in Safari that causes other issues fixing this one.
4、Use only common fonts (Arial, Georgia, Verdana etc) because of different browsers and OS’s render it differently.
5、Size font in em through the page, but initialise in % for body. I’m not exactly sure about this, but the reason is that "The ability to resize text differs amongst browsers and OS’s".
6、All layout divs that are floated should include display:inline and overflow:hidden. This is due to IE doubles margins on the float side and IE 6 layout problems.
7、Carefully clear floats using overflow:auto or overflow:hidden. Be aware of issues. See Sample().
8、Use CSS selectors subset that all of your browser support. See browser CSS selectors support.
9、Do not use PNG transparency if you need to support IE 6.
二、关于如何设置字体大小:http://alistapart.com/article/howtosizetextincss
body {
font-size:100%;
line-height:1.125em; /* 16×1.125=18 */
}.bodytext p {
font-size:0.875em;
}.sidenote {
font-size:0.75em;
}
body标签用百分数定义字体大小;其他地方用em单位定义;
三、min-height如何在ie6下实现:http://www.educity.cn/gongju/1281455.html
四、如何写出兼容大部分浏览器的CSS: http://www.cnblogs.com/LoveJenny/archive/2012/08/27/2657930.html