引言,我做文章管理的時(shí)候,引入的是layui的表格樣式,但是里面的內(nèi)容溢出無法隱藏,后來我采用了往td里面加了個(gè)<div></div>
然后設(shè)置一下樣式就可以了。
<table class="layui-table"> <colgroup> <col width="100"> <col width="150"> <col> </colgroup> <thead> <tr> <th>序號</th> <th>文章標(biāo)題</th> <th>文章內(nèi)容</th> <th>發(fā)布時(shí)間</th> <th>發(fā)布人</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表格內(nèi)容溢出的解決方法就是小編分享給大家的全部內(nèi)容了,希望能給大家一個(gè)參考,也希望大家多多支持武林網(wǎng)。
新聞熱點(diǎn)
疑難解答
網(wǎng)友關(guān)注