引言,我做文章管理的時候,引入的是layui的表格樣式,但是里面的內容溢出無法隱藏,后來我采用了往td里面加了個<div></div>
然后設置一下樣式就可以了。
<table class="layui-table"> <colgroup> <col width="100"> <col width="150"> <col> </colgroup> <thead> <tr> <th>序號</th> <th>文章標題</th> <th>文章內容</th> <th>發布時間</th> <th>發布人</th> <th>操作</th> </tr> </thead> <tbody> <c:forEach items="${pageInfo.list}" var="a"> <tr style="height:auto;"> <td class="lid">${a.aId}</td> <td>${a.aTitle }</td> <td class="ac" style=""><div style="width:500px; overflow:hidden; white-space:nowrap; text-overflow:ellipsis;">${a.aContent}</div></td> <td><fmt:formatDate type="both" dateStyle="long" timeStyle="long" value="${a.aTime}" /></td> <td>${a.whoRelease}</td> <td> <button class="layui-btn-danger layui-btn layui-delete"><i class="layui-icon">à</i></button></td> </tr> </c:forEach> </tbody> </table>
以上這篇layui表格內容溢出的解決方法就是小編分享給大家的全部內容了,希望能給大家一個參考,也希望大家多多支持腳本之家。
聲明:本網頁內容旨在傳播知識,若有侵權等問題請及時與本網聯系,我們將在第一時間刪除處理。TEL:177 7030 7066 E-MAIL:11247931@qq.com