单元格内容超出宽度时隐藏多余部分:
<style type="text/css">
.textOverFlow {
width:300px;
overflow:hidden;
text-overflow:ellipsis;/* (IE专用) */
white-space:nowrap;
border:1px solid #ddd;
}
</style>
有时广告经常会撑破,知道用OVERFLOW: hidden; 这个代码了,但还是无效怎么办?在后面加一句position:relative;就可以了。
<style type="text/css">
.textOverFlow {
width:300px;
overflow:hidden;
text-overflow:ellipsis;/* (IE专用) */
white-space:nowrap;
border:1px solid #ddd;
}
</style>
有时广告经常会撑破,知道用OVERFLOW: hidden; 这个代码了,但还是无效怎么办?在后面加一句position:relative;就可以了。