我在调试IE时并不擅长,因为......好吧因为我讨厌它并且想要它与它无关> _<
无论如何......我正在创建这个treeview插件,一切看起来都很棒......
但是, 出于某种原因 ,它看起来完全搞砸了IE7和IE7(不知道IE6等,但严重的是,搞砸那块#%/“#)。
有谁知道如何修复它或者为什么这样做?
Here's the generated html & css example
body{
margin: 0px;
padding: 0px;
}
.vbc-treeview{
font-family: Tahoma, Geneva, sans-serif;
font-size: 12px;
padding-left: 10px;
padding-top: 0px;
overflow: auto;
width: 200px;
height: 200px;
border: 1px solid #828790;
margin: 5px;
}
.vbc-treeview ul{
list-style-type: none;
margin: 0px;
margin-left: 20px;
margin-top: 0px;
padding: 0px;
position: relative;
}
.vbc-treeview ul:first-child{
margin-left: 10px;
}
.vbc-treeview li{
position: relative;
}
.vbc-treeview li:first-child{
padding-top: 0px !important;
}
.vbc-treeview li a{
text-decoration: none;
color: black;
display: block;
cursor: default;
line-height: 16px;
}
.vbc-treeview .tv-sibling{
position: absolute;
background-color: transparent;
background: url(http://img813.imageshack.us/img813/1664/connector.png);
}
.vbc-treeview .tv-sibling-horizontal{
left: -12px;
top: 8px;
background-repeat: repeat-x;
height: 1px;
width: 8px;
z-index: 0;
}
.vbc-treeview .tv-sibling-vertical{
left: -14px;
top: 0px;
background-repeat: repeat-y;
height: 100%;
width: 1px;
z-index: 0;
}
.vbc-treeview .tv-sibling-first{
top: 8px;
}
.vbc-treeview .tv-collapse{
position: absolute;
background: url(http://img825.imageshack.us/img825/2134/collapser.png) no-repeat center;
width: 9px;
height: 9px;
left: -18px;
top: 4px;
z-index: 1;
}
.vbc-treeview .tv-expanded{
background-position: 0px 0px;
}
.vbc-treeview .tv-collapsed{
background-position: -10px 0px;
}
<div class="tree vbc-treeview">
<ul>
<div class="tv-sibling tv-sibling-vertical tv-sibling-first" style="height: 609px;"></div>
<li class="tv-expanded">
<div class="tv-collapse tv-expanded"></div>
<div class="tv-sibling tv-sibling-horizontal"></div>
<a href="#">Node 0,2</a>
<ul>
<div class="tv-sibling tv-sibling-vertical" style="height: 41px;"></div>
<li>
<div class="tv-sibling tv-sibling-horizontal"></div>
<a href="#">Node 0,2,0</a>
</li>
<li>
<div class="tv-sibling tv-sibling-horizontal"></div>
<a href="#">Node 0,2,1</a>
</li>
<li>
<div class="tv-sibling tv-sibling-horizontal"></div>
<a href="#">Node 0,2,2</a>
</li>
</ul>
</li>
<li class="tv-expanded">
<div class="tv-collapse tv-expanded"></div>
<div class="tv-sibling tv-sibling-horizontal"></div>
<a href="#">Node0</a>
<ul>
<div class="tv-sibling tv-sibling-vertical" style="height: 249px;"></div>
<li class="tv-expanded">
<div class="tv-collapse tv-expanded"></div>
<div class="tv-sibling tv-sibling-horizontal"></div>
<a href="#">Node 0,0</a>
<ul>
<div class="tv-sibling tv-sibling-vertical" style="height: 121px;"></div>
<li>
<div class="tv-sibling tv-sibling-horizontal"></div>
<a href="#">Node 0,0</a></li>
<li>
<div class="tv-sibling tv-sibling-horizontal"></div>
<a href="#">Node 0,1</a></li>
<li class="tv-expanded">
<div class="tv-collapse tv-expanded"></div>
<div class="tv-sibling tv-sibling-horizontal"></div>
<a href="#">Node 0,2</a>
<ul>
<div class="tv-sibling tv-sibling-vertical" style="height: 57px;"></div>
<li>
<div class="tv-sibling tv-sibling-horizontal"></div>
<a href="#">Node 0,2,0</a>
</li>
<li>
<div class="tv-sibling tv-sibling-horizontal"></div>
<a href="#">Node 0,2,1</a>
</li>
<li>
<div class="tv-sibling tv-sibling-horizontal"></div>
<a href="#">Node 0,2,2</a>
</li>
<li>
<div class="tv-sibling tv-sibling-horizontal"></div>
<a href="#">Node 0,2,3</a>
</li>
</ul>
</li>
<li>
<div class="tv-sibling tv-sibling-horizontal"></div>
<a href="#">Node 0,3</a>
</li>
</ul>
</li>
<li>
<div class="tv-sibling tv-sibling-horizontal"></div>
<a href="#">Node 0,1</a>
</li>
<li class="tv-expanded">
<div class="tv-collapse tv-expanded"></div>
<div class="tv-sibling tv-sibling-horizontal"></div>
<a href="#">Node 0,2</a>
<ul>
<div class="tv-sibling tv-sibling-vertical" style="height: 57px;"></div>
<li>
<div class="tv-sibling tv-sibling-horizontal"></div>
<a href="#">Node 0,2,0</a>
</li>
<li>
<div class="tv-sibling tv-sibling-horizontal"></div>
<a href="#">Node 0,2,1</a>
</li>
<li>
<div class="tv-sibling tv-sibling-horizontal"></div>
<a href="#">Node 0,2,2</a>
</li>
<li>
<div class="tv-sibling tv-sibling-horizontal"></div>
<a href="#">Node 0,2,3</a>
</li>
</ul>
</li>
<li>
<div class="tv-sibling tv-sibling-horizontal"></div>
<a href="#">Node 0,3</a>
</li>
</ul>
</li>
<li class="tv-expanded"><div class="tv-collapse tv-expanded"></div><div class="tv-sibling tv-sibling-horizontal"></div>
<a href="#">Node1</a>
<ul><div class="tv-sibling tv-sibling-vertical" style="height: 25px;"></div>
<li><div class="tv-sibling tv-sibling-horizontal"></div><a href="#">Node 1,0</a></li>
<li><div class="tv-sibling tv-sibling-horizontal"></div><a href="#">Node 1,1</a></li>
</ul>
</li>
<li>
<div class="tv-sibling tv-sibling-horizontal"></div>
<a href="#">Node2</a>
</li>
<li class="tv-expanded">
<div class="tv-collapse tv-expanded"></div>
<div class="tv-sibling tv-sibling-horizontal"></div>
<a href="#">Node3</a>
<ul>
<div class="tv-sibling tv-sibling-vertical" style="height: 185px;"></div>
<li>
<div class="tv-sibling tv-sibling-horizontal"></div>
<a href="#">Node 3,0</a>
</li>
<li>
<div class="tv-sibling tv-sibling-horizontal"></div>
<a href="#">Node 3,1</a>
</li>
<li class="tv-expanded">
<div class="tv-collapse tv-expanded"></div>
<div class="tv-sibling tv-sibling-horizontal"></div>
<a href="#">Node 3,2</a>
<ul>
<div class="tv-sibling tv-sibling-vertical" style="height: 121px;"></div>
<li>
<div class="tv-sibling tv-sibling-horizontal"></div>
<a href="#">Node 3,2,0</a>
</li>
<li class="tv-expanded">
<div class="tv-collapse tv-expanded"></div>
<div class="tv-sibling tv-sibling-horizontal"></div>
<a href="#">Node 3,2,1</a>
<ul>
<div class="tv-sibling tv-sibling-vertical" style="height: 57px;"></div>
<li>
<div class="tv-sibling tv-sibling-horizontal"></div>
<a href="#">Node 3,2,1,0</a>
</li>
<li>
<div class="tv-sibling tv-sibling-horizontal"></div>
<a href="#">Node 3,2,1,1</a>
</li>
<li>
<div class="tv-sibling tv-sibling-horizontal"></div>
<a href="#">Node 3,2,1,2</a>
</li>
<li>
<div class="tv-sibling tv-sibling-horizontal"></div>
<a href="#">Node 3,2,1,3</a>
</li>
</ul>
</li>
<li>
<div class="tv-sibling tv-sibling-horizontal"></div>
<a href="#">Node 3,2,2</a>
</li>
<li>
<div class="tv-sibling tv-sibling-horizontal"></div>
<a href="#">Node 3,2,3</a>
</li>
</ul>
</li>
<li>
<div class="tv-sibling tv-sibling-horizontal"></div>
<a href="#">Node 3,3</a>
</li>
</ul>
</li>
<li>
<div class="tv-sibling tv-sibling-horizontal"></div>
<a href="#">Node4</a>
</li>
</ul>
</div>
答案 0 :(得分:2)
尝试在父position:relative
上添加div
。
答案 1 :(得分:1)
问题在于position: relative;
项。
删除它,它应该工作。
另外,请尝试向这些元素添加zoom: 1
以查看它是否有效。