码迷,mamicode.com
首页 > Web开发 > 详细

thinkphp5: 循环输出表格,并固定表格单元宽度(过长省略号)

时间:2019-03-24 21:55:20      阅读:198      评论:0      收藏:0      [点我收藏+]

标签:check   类别   text   ext   次数   stripe   ace   _id   class   

html:

<table class="table table-striped" style=‘table-layout:fixed;‘>
                  <thead class="table_head"> <tr> <th><input type="checkbox"></th> <th>编号</th> <th>标题</th> <th>类别</th> <th>时间</th> <th>内容</th> <th>观看次数</th> <th>发布人</th> <th>操作</th> </tr> </thead> <tbody> {volist name="blogs" id=‘vo‘} <tr> <td><input type="checkbox"></td> <td>{$vo.blog_id}</td> <td>{$vo.title}</td> <td>{$vo.class}</td> <td>{$vo.time}</td> <td>{$vo.content}</td> <td>{$vo.watch_num}</td> <td>{$vo.owner}</td> <td><a>删除</a></td> </tr> {/volist} </tbody> </table>

 css:

.table tbody tr td{
      overflow: hidden; 
      text-overflow:ellipsis;  
      white-space: nowrap; 
 }

  

thinkphp5: 循环输出表格,并固定表格单元宽度(过长省略号)

标签:check   类别   text   ext   次数   stripe   ace   _id   class   

原文地址:https://www.cnblogs.com/yinwei-space/p/10590280.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!