Settings | Sign in | Sign up

The author has 6 posts.

ie下没有高度的ulli组

Floor 1 过去的记忆02 12/4/10 10:46
.x3 {
 list-style-type: none;
 margin: 0px;
 padding: 0px;
}
.x3 li.a {
 background-color: #0099FF;
 height: 20px;
 width: 100px;
}
.x3 li.b {
 background-color: #FF9900;
 height: 20px;
 width: 100px;
}
Floor 2 过去的记忆02 12/4/10 10:46
<ul class="x3">
  <li class="a"></li>
  <li class="b"></li>
</ul>
Floor 3 过去的记忆02 12/4/10 10:49

下面这个是有高度的:

.xf {
 margin: 0px;
 padding: 0px;
 list-style-type: none;
}
.xf li.a {
 background-color: #FFCCCC;
 height: 10px;
 width: 50px;
}
.xf li.b {
 background-color: #FF33CC;
 height: 10px;
 width: 50px;
}

Floor 4 过去的记忆02 12/4/10 10:49
<ul class="xf">
  <li class="a"></li>
  <li class="b"></li>
</ul>
Floor 5 过去的记忆02 12/4/10 10:50
归纳:若第一个li标签的高度小于20,那么ie浏览器下两个li块就有高度。
Floor 6 过去的记忆02 12/4/10 10:54
真是太诡异了,吧上面的代码保存为新的html文件,居然没有高度。而应用到list.php中,第二个ul居然有高度。

Content converter:

Reply the post
Content:
User: You are currently anonymous.
Captcha:
Unclear? Try another one.