好得很程序员自学网

<tfoot draggable='sEl'></tfoot>

兼容古董级IE小结_html/css_WEB-ITnose

IE6已经死亡,当然7,8,9,10也挂掉了。微软对IE11更下了狠手,对其停止了更新。以为前端就可以安安心心地写代码了。可是就是有些顽固分子,竟然用的还是IE6,尊崇客户至上的原则,就恶心着给他兼容老古董。

.sector{max-width:500px; _width:expression((documentElement.clientWidth>500)?"500px":"auto");min-width:300px; _width:expression((documentElement.clientWidth 

万能 float 闭合

相信这个hask大家都不陌生,给需要闭合的div加上 class="clearfix" 即可。

 1 /* Clear Fix */ 2 .clearfix:after{ 3     content:"."; 4     display:block; 5     height:0; 6     clear:both; 7     visibility:hidden; 8 } 9 10 .clearfix{11     display:inline-block;12 }13 14  15 /* Hide from IE Mac */16 .clearfix {display:block;}17 /* End hide from IE Mac */18 /* end of clearfix */ 


对IE6PNG显示问题

只需将透明png图片命名为 *-trans.png ,但此方法对背景平铺(background-repeat)和背景(background-position)无法起到任何作用,默认会占满整个容器。

marging与padding引起高度不适应

FF下给 div 设置 padding 后会导致 width 和 height 增加, 但IE不会.(可用!important解决,随着IE7对!important的支持,!important 方法现在只针对IE6的HACK。)。高度不适应是当内层对象的高度发生变化时外层高度不能自动进行调节,特别是当内层对象使用margin 或paddign 时。例:

p对象中的内容

查看更多关于兼容古董级IE小结_html/css_WEB-ITnose的详细内容...

  阅读:27次