<script type="text/JavaScript"> alimama_pid="mm_11307516_1146824_2589042"; alimama_titlecolor="0000FF"; alimama_descolor ="000000"; alimama_bgcolor="FFFFFF"; alimama_bordercolor="E6E6E6"; alimama_linkcolor="008000"; alimama_bottomcolor="FFFFFF"; alimama_anglesize="0"; alimama_bgpic="0"; alimama_icon="0"; alimama_sizecode="12"; alimama_width=468; alimama_height=60; alimama_type=2; </script> <script src="http://a.alimama.cn/inf.js" type="text/javascript"> </script>
IE7和Firefox都支持min-height,max-height等属性,但IE6不支持。要想使用就需要使用css钩子技术。
希望ie6这个兼容性最差的浏览器早点淘汰吧,开发者也省点事,但目前ie6用户还最多!
方法一,网站找的。
.minh100 {
background:#ccc;
min-height:100px; /*ie7 ff生效*/
height:auto !important; /*ie7 ff生效*/
height:100px; /*ie6 ie7生效*/
overflow:visible; /*修正ie下height:100px为自动高度*/
}
方法二,我发明的。
.minh100{
background:#ccc;
*height:100px; /*ie6 ie7生效*/
min-height:100px; /*ie7 ff生效*/
*height:auto !important; /*修正ie7下height:100px为自动高度*/
}
<div class="minh100">
12月4日晚7点多钟,山西太原市杏花<br/>
岭区检察院四名干警,<br/>
来京将中央电视台女政法记者李<br/>
某从住宅中连夜带走,据介绍<br/>
,该记者曾以涉嫌滥用职权为由<br/>
采访过太原杏花岭区检察院;<br/>
而检方认为该记者涉嫌受贿。<br/>
</div>