css设置让文本内容超过一定限度用...代替
<p class="text-muted bookDetailFont" style="width:100%;height:100px;overflow:hidden;text-overflow:ellipsis;line-height:24px;white-space:nowrap;">内容</p>
第一步:设置html元素的宽高
第二步:强制文本在一行内显示 white-space:nowrap;(这个也可以用<norb></norb>代替)
第三步:超出的文本隐藏overflow:hidden;
text-overflow:ellipsis;溢出文本的显示样式为...
但是我不会多行溢出的隐藏?????
这个博客里有解答: http://hi.baidu.com/1325868819/item/104b5095e33119fe7b7f019f
浙公网安备 33010602011771号