我有一个表格单元格div
里面。我想要div
溢出到表格单元格之外。我怎样才能做到这一点?需要明确的是,我不希望表格单元格随着div
。下面的代码是我尝试过的,但它不起作用。
HTML:
<table>
<tr class="row">
<td class="cell">
<div class="overflow">Overlow outside of this cell</div>
</td>
</tr>
</table>
CSS:
.row {
height:24px;
overflow:visible;
}
.cell {
overflow:visible;
max-height:24px !important;
}
.overflow {
height:24px;
font-size:12px;
clear:both;
white-space: nowrap;
line-height:16px;
zoom:1;
text-align:left;
overflow:hidden;
}
如果我猜对了你的话this http://jsfiddle.net/7zps4/可能有帮助:
.row {
height: 24px;
overflow: visible;
}
.cell {
overflow: visible;
max-height: 24px !important;
border: 1px solid #cccccc;
width: 10px;
}
.overflow {
height: 24px;
font-size: 12px;
line-height: 16px;
position: absolute;
}
<table>
<tr class="row">
<td class="cell">
<div class="overflow">Overlow outside of this cell</div>
</td>
</tr>
</table>
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)