這是默認展示的,text-overflow:ellipsis; 屬性可以實作
<div class="forum-sub-title note-content" style="width:630px; overflow:hidden; white-space:nowrap;text-overflow:ellipsis; ">

下面是ajax請求回傳的資料,追加的
$.each(data,function (k,v) {
html +='<div class="forum-sub-title note-content" style="width:630px; overflow:hidden; white-space:nowrap;text-overflow:ellipsis; ">'+v.content+'</div>'
})
$('#list').append(html);
結果要隱藏的內容全部展示出來了

請問如何解決這種問題?
uj5u.com熱心網友回復:
v.content 是否包含了<br/> 或其它標簽uj5u.com熱心網友回復:
有的
uj5u.com熱心網友回復:
把標簽都洗掉了就是一行了轉載請註明出處,本文鏈接:https://www.uj5u.com/qianduan/102658.html
標籤:Ajax
上一篇:echarts離線地圖怎么使用?
