首页 新闻 搜索 专区 学院

overflow:hidden在opera里的bug求解

0
悬赏园豆:40 [已关闭问题] 关闭于 2011-04-15 10:28

overflow:hidden在opera里的奇怪bug,溢出内容隐藏了,但是高度却没隐藏,导致高度被撑开了。
大家可以用这代码试试,将窗口高度缩小到winlist的高度,就能看到旁边浏览器的滚动条被撑开了。

有什么办法解决吗?

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>无标题文档</title>
<style>
.winlist
{
margin
:4px 10px 0 12px;
position
:relative;
height
:260px;
overflow
:hidden;
zoom
:1;
}
.winlist ul
{
position
:absolute;
width
:100%;
}
.winlist ul li
{
line-height
:22px;
height
:22px;
color
:#9d1f24;
font-size
:14px;
padding-right
:72px;
position
:relative;
}
.winlist ul li .sum
{
display
:block;
width
:70px;
position
:absolute;
right
:0;
top
:0;
text-align
:right;
}
.winlist ul li .name
{
display
:block;
white-space
:nowrap;
overflow
:hidden;
text-overflow
:ellipsis;
width
:100%;
}
</style>

</head>

<body style="position:relative;">
<div style="width:600px; background:#CCC; position:relative;">
<div class="winlist" id="winlist">
<ul id="winobj">
<li><span class="name">username</span><span class="sum">9998.20</span></li>
<li><span class="name">username</span><span class="sum">9998.20</span></li>
<li><span class="name">username</span><span class="sum">9998.20</span></li>
<li><span class="name">username</span><span class="sum">9998.20</span></li>
<li><span class="name">username</span><span class="sum">9998.20</span></li>
<li><span class="name">username</span><span class="sum">9998.20</span></li>
<li><span class="name">username</span><span class="sum">9998.20</span></li>
<li><span class="name">username</span><span class="sum">9998.20</span></li>
<li><span class="name">username</span><span class="sum">9998.20</span></li>
<li><span class="name">username</span><span class="sum">9998.20</span></li>
<li><span class="name">username</span><span class="sum">9998.20</span></li>
<li><span class="name">username</span><span class="sum">9998.20</span></li>
<li><span class="name">username</span><span class="sum">9998.20</span></li>
<li><span class="name">username</span><span class="sum">9998.20</span></li>
<li><span class="name">username</span><span class="sum">9998.20</span></li>
<li><span class="name">username</span><span class="sum">9998.20</span></li>
<li><span class="name">username</span><span class="sum">9998.20</span></li>
<li><span class="name">username</span><span class="sum">9998.20</span></li>
</ul>
</div>
</div>
</body>
</html>
Lecaf的主页 Lecaf | 菜鸟二级 | 园豆:352
提问于:2011-04-14 10:50
< >
分享
所有回答(0)
清除回答草稿
   您需要登录以后才能回答,未注册用户请先注册