添加字段显示省略号
這里只要講方法的使用
1 controller傳過(guò)來(lái)數(shù)據(jù),然后要給某個(gè)字段限制長(zhǎng)度,過(guò)長(zhǎng)就的部分用省略號(hào)代替。
2? 在html 的首部添加style:
<style>
.table-responsive .table>tbody tr td:nth-child(2) div{width: 150px;
overflow:hidden;
white-space:nowrap;
text-overflow:ellipsis;
}
</style>
3 如何 寫style 樣式:f12 :查看---??
.table-responsive : class="table-responsive " ---.table :.table-responsive 下的table 下的tbody 的所有tr 的第二個(gè)td
4 類似的樣式就是這樣玩的了。。
轉(zhuǎn)載于:https://www.cnblogs.com/yang1com/p/10796499.html
總結(jié)
- 上一篇: 【转】Linux将composer的bi
- 下一篇: 分辨率与栅格系统的对应关系: