<table class="am-table am-table-striped am-table-hover table-main am-table-compact " style="table-layout: fixed;">

<thead>

<tr>

<th class="table-check"><input type="checkbox" id="checkall"/></th>

<th class="table-author am-show-sm-only">节目名称</th>

<th class="table-author am-show-sm-only"style="width:120px;">所属电视台</th>

<th class="table-author am-hide-sm-only" style="width:50px;">版本</th>

<th class="table-author am-hide-sm-only">开始时间</th>

<th class="table-author am-hide-sm-only">结束时间</th>

<th class="table-date am-hide-sm-only">获取时间</th>

<th class="table-set" style="width:140px;">操作</th>

</tr>

</thead>

<tbody>

[#if list][#list list.items as t]

<tr>

<td><input type="checkbox" class="checkone"/><input type="hidden" value="${t._id}"></td>

<td style="overflow: hidden;white-space: nowrap;text-overflow: ellipsis;" class="logcontent" >${t.program}</td>

<td >${t.channelName}</td>

<td >${t.__v}</td>

<td style="overflow: hidden;white-space: nowrap;text-overflow: ellipsis;" class="logcontent">${t.beginTime?string("yyyy年MM月dd日HH时mm分ss秒")}</td>

<td style="overflow: hidden;white-space: nowrap;text-overflow: ellipsis;" class="logcontent">${t.endTime?string("yyyy年MM月dd日HH时mm分ss秒")}</td>

<td style="overflow: hidden;white-space: nowrap;text-overflow: ellipsis;" class="logcontent">${t.addTime?string("yyyy年MM月dd日HH时mm分ss秒")}</td>

<td>

<div class="am-btn-toolbar">

<div class="am-btn-group am-btn-group-xs">

<button class="am-btn am-btn-default am-btn-xs am-text-secondary"  onclick="location='/TVPrograms/addOne.do?_id=${t._id}&userName=${datamanager.username}&forwardUrl=${forwardUrl}'" ><span class="am-icon-pencil-square-o"></span> 编辑</button>

<button class="am-btn am-btn-default am-btn-xs am-text-danger am-hide-sm-only"   onclick="check('${t._id}','${datamanager.username}')"><span class="am-icon-trash-o"></span> 删除</button>

</div>

</div>

</td>

</tr>

[/#list]

[/#if]

</tbody>

</table>

js代码:

//logcontent内容过长

$(".logcontent").each(function(){

$(this).click(function(){

var a = $(this).css("white-space");

if(a=="nowrap"){

$(this).css("white-space","normal");

}else{

$(this).css("white-space","nowrap");

}

})

})

style="table-layout: fixed;":设置表格大小固定 (列宽由表格宽度和列宽度设定)。

style="overflow: hidden;white-space: nowrap;text-overflow: ellipsis;"

   overflow:溢出内容会被修剪,并且其余内容是不可见的。

   white-space:规定段落中的文本不进行换行

   text-overflow:显示省略符号来代表被修剪的文本。

table单元格内容过多换行显示的更多相关文章

  1. Vue. 之 Element table 单元格内容隐藏

    Vue. 之 Element table 单元格内容隐藏 在table显示数据时,若某个单元格的内容过多,需要进行隐层,在这一列的单元格属性添加::show-overflow-tooltip=&quo ...

  2. html 让table表格中的td单元格内容过长显示为固定长度,多余部分用省略号代替?

    <th class="wrap">商品名</th> .wrap{ width: 150px; //设置需要固定的宽度 white-space: nowrap ...

  3. LaTex表格内单元格内容强制换行

    /newcommand{/tabincell}[2]{/begin{tabular}{@{}#1@{}}#2/end{tabular}}%放在导言区 %然后使用&/tabincell{c}{} ...

  4. LaTex: 表格单元格内容 分行显示/换行

    问题:如何同时让表格同一行一个单元格的文字能垂直居中?比如说文字超长超出页面范围需要分行显示 答:(来源于smth) 方案一: \newcommand{\tabincell}[2]{\begin{ta ...

  5. Easyui datagrid 设置内容超过单元格宽度时自动换行显示

    datagrid 设置内容超过单元格宽度时自动换行显示 by:授客 QQ:1033553122 测试环境 jquery-easyui-1.5.3 问题描述 单元格内容超过单元格宽度不会自动化换行.如下 ...

  6. EasyUI Datagrid 鼠标悬停显示单元格内容 复制代码

    EasyUI Datagrid 鼠标悬停显示单元格内容 ,halign:, align: 0 « 上一篇:LINQ to Entities 中的查询» 下一篇:去掉字符串中的非数字字符 posted ...

  7. EasyUI的Datagrid鼠标悬停显示单元格内容

    功能描述:table鼠标悬停显示单元格内容 1.js函数 function hoveringShow(value) { return "<span title='" + va ...

  8. js如何实现动态显示表格数据(点奇数显示奇数单元格内容)

    js如何实现动态显示表格数据(点奇数显示奇数单元格内容) 一.总结 一句话总结: 1.动态指定表格中每个单元格的id,然后通过id可以获取每个单元格,然后对里面的innerHTML进行赋值. 2.弄了 ...

  9. C# DataGridView在单元格提示里(ToolTip)显示完整的单元格内容

    当单元格内容太多时,则会忽略后面的内容 解决方案: 添加Dgv鼠标移到单元格事件时,设置当前单元格的ToolTipText属性内容为当前单元格内容 void From_Load(object send ...

随机推荐

  1. 六、react添加多个className报错解决方法

    例如<div className={style.calss1,style.class2}></div> 该方法会报错 想得到最终渲染的结果:<div class='cla ...

  2. 增强的格式化字符串format函数

    http://blog.csdn.net/handsomekang/article/details/9183303 自python2.6开始,新增了一种格式化字符串的函数str.format(),可谓 ...

  3. Linux命令的常用

    使用chown命令更改文件拥有者 在 shell 中,可以使用chown命令来改变文件所有者.chown命令是change owner(改变拥有者)的缩写.需要要注意的是,用户必须是已经存在系统中的, ...

  4. 驾考试题的json代码

    { "statusCode": "000000", "desc": "请求成功", "result" ...

  5. 配置管理-SpringCloudConfig

    1.搭建配置管理服务 添加依赖 <dependencies> <dependency> <groupId>org.springframework.cloud< ...

  6. 用纯CSS实现加载中动画效果

    HTML <div class="pswp__preloader__icn"> <div class="pswp__preloader__cut&quo ...

  7. 【Mysql】mysql中bigint、int、mediumint、smallint 和 tinyint的取值范围

    1.bigint 从 -2^63 (-9223372036854775808) 到 2^63-1 (9223372036854775807) 的整型数据(所有数字),无符号的范围是0到 1844674 ...

  8. 17.VUE学习之- v-for指令的使用方法

    <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8&quo ...

  9. python简单试题4

    ( ps : 题目中用到的一些random函数在最后末尾处有介绍)  1,在屏幕上显示跑马灯文字 import os # 调用os模块 import time # 调用时间模块 def main(): ...

  10. UML类图关系模式(C++代码说明)

    在UML类图中的关系模式主要有以下几种: 泛化(Generalization),  实现(Realization), 关联(Association), 聚合(Aggregation), 依赖(Depe ...