将行内超出内容进行隐藏,并在鼠标移至行时显示全部内容

来源:互联网 发布:htpc专用软件 编辑:程序博客网 时间:2024/06/07 05:34

一、创建CSS样式

.bm1{ width:300px;     text-align:left;      overflow:hidden;      text-overflow:ellipsis;      white-space:nowrap;} 

二、jsp中使用 label 中 title 属性,将所需显示的内容赋值给到 title 值

<label class="bm1" title="${obj[1]}">${obj[1]}</label>


0 0