摘要: div+css 兼容ie6 ie7 ie8 ie9和FireFox Chrome等浏览器方法1.DOCTYPE 影响 CSS 处理2.FF: div 设置 margin-left, margin-right 为 auto 时已经居中, IE 不行3.FF: body 设置 text-align 时, div 需要设置 margin: auto(主要是 margin-left,margin-right) 方可居中4.FF: 设置 padding 后, div 会增加 height 和 width, 但 IE 不会, 故需要用 !important 多设一个 height 和 width5.FF: 阅读全文
posted @ 2011-06-08 18:10 piuba 阅读(778) 评论(0) 推荐(0) 编辑
摘要: 阅读全文
posted @ 2011-06-08 17:27 piuba 阅读(117) 评论(0) 推荐(0) 编辑
摘要: 起源:.clearfix:after {visibility: hidden;display: block;font-size: 0;content: " ";clear: both;height: 0;}.clearfix { display: inline-table; }/* Hides from IE-mac \*/* html .clearfix { height: 1%; }.clearfix { display: block; }/* End hide from IE-mac */说明:*对大多数符合标准的浏览器应用第一个声明块,目的是创建一个隐形的内容为空的 阅读全文
posted @ 2011-06-08 10:55 piuba 阅读(219) 评论(0) 推荐(0) 编辑