各种问题+IE6bug密集型层

2012-03-13 16:50:47

1.如果元素不是position:absolute; 那么z-index属性就会无效。想用jquery调用z-index就会不好使。
2.父元素没高度,但是子元素有高度,在chrome下调试看不到父元素高度,可以给父元素加overflow:hidden;
3.b元素 margin,padding无效时试试display:block;
4.jquery设置属性无效时,很有可能是元素在css里没设置属性,想要调用,前提是得有。
5.在IE6下table右侧边框消失,很可能是某行td colspan 属性设置的过多。
6.IE6下DIV消失
举例说明下
<style>
.test{position:relative;width:400px;height:300px;}
.s1{background:#f5f9e8;width:100px;height:200px;position:absolute; top:100px;}
.s2{background:#f6e7fc;width:200px;height:100px;float:left;}
.s3{background:#deeffb;;width:200px;height:100px;float:left;}
</style>
<div class="test">
<div class="s1">orz-i.com</div>
<div class="s2">orz-i.com</div>
<div class="s3">orz-i.com</div>
</div>
.s1元素会在IE6下消失,解决办法:为s1元素外加上一个新的层元素将S1包含在内,例如
<div id="fuck-ie-6"><div>orz-i.com</div></div>

#fuck-ie-6:{position:relative}
7.行内元素在IE6下上下border消失,解决办法:将元素设置display:block;
|