table单元格内容过多换行显示
<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单元格内容过多换行显示的更多相关文章
- Vue. 之 Element table 单元格内容隐藏
Vue. 之 Element table 单元格内容隐藏 在table显示数据时,若某个单元格的内容过多,需要进行隐层,在这一列的单元格属性添加::show-overflow-tooltip=&quo ...
- html 让table表格中的td单元格内容过长显示为固定长度,多余部分用省略号代替?
<th class="wrap">商品名</th> .wrap{ width: 150px; //设置需要固定的宽度 white-space: nowrap ...
- LaTex表格内单元格内容强制换行
/newcommand{/tabincell}[2]{/begin{tabular}{@{}#1@{}}#2/end{tabular}}%放在导言区 %然后使用&/tabincell{c}{} ...
- LaTex: 表格单元格内容 分行显示/换行
问题:如何同时让表格同一行一个单元格的文字能垂直居中?比如说文字超长超出页面范围需要分行显示 答:(来源于smth) 方案一: \newcommand{\tabincell}[2]{\begin{ta ...
- Easyui datagrid 设置内容超过单元格宽度时自动换行显示
datagrid 设置内容超过单元格宽度时自动换行显示 by:授客 QQ:1033553122 测试环境 jquery-easyui-1.5.3 问题描述 单元格内容超过单元格宽度不会自动化换行.如下 ...
- EasyUI Datagrid 鼠标悬停显示单元格内容 复制代码
EasyUI Datagrid 鼠标悬停显示单元格内容 ,halign:, align: 0 « 上一篇:LINQ to Entities 中的查询» 下一篇:去掉字符串中的非数字字符 posted ...
- EasyUI的Datagrid鼠标悬停显示单元格内容
功能描述:table鼠标悬停显示单元格内容 1.js函数 function hoveringShow(value) { return "<span title='" + va ...
- js如何实现动态显示表格数据(点奇数显示奇数单元格内容)
js如何实现动态显示表格数据(点奇数显示奇数单元格内容) 一.总结 一句话总结: 1.动态指定表格中每个单元格的id,然后通过id可以获取每个单元格,然后对里面的innerHTML进行赋值. 2.弄了 ...
- C# DataGridView在单元格提示里(ToolTip)显示完整的单元格内容
当单元格内容太多时,则会忽略后面的内容 解决方案: 添加Dgv鼠标移到单元格事件时,设置当前单元格的ToolTipText属性内容为当前单元格内容 void From_Load(object send ...
随机推荐
- hdu-1874 畅通工程续---模板题
题目链接: http://acm.hdu.edu.cn/showproblem.php?pid=1874 题目大意: 求起点到终点的最短距离 解题思路: 注意重边,其他的就是模板 #include&l ...
- Object comparison - (BOOL)isEqual:(id)other
https://developer.apple.com/library/content/documentation/General/Conceptual/DevPedia-CocoaCore/Obje ...
- 【BZOJ1257】[CQOI2007] 余数之和(数学题)
点此看题面 大致题意: 求\(\sum_{i=1}^nk\%i\). 关于除法分块 这是一道除法分块的简单应用题. 式子转换 显然\(k\%i\)是一个很难处理的项. 于是我们就要使用使用一个常用的套 ...
- Java后台调用gcc编译C语言代码
想做一个能够在线编译代码运行的平台,Java和SQL已经支持了,因为是用Java写的后台,所以Java和SQL挺容易就实现了,做到支持C的时候就卡住了,网上搜了一下这种帖子好像很少. 我采取的办法是就 ...
- spring-boot自定义启动端口
有时候我们可能需要启动不止一个SpringBoot,而SpringBoot默认的端口号是8080,所以这时候我们就需要修改SpringBoot的默认端口了.修改SpringBoot的默认端口有两种方式 ...
- Oracle 数据库、实例、表空间、用户、数据库对象
Oracle是一种数据库管理系统,是一种关系型的数据库管理系统.通常情况了我们称的“数据库”,包含了物理数据.数据库管理系统.内存.操作系统进程的组合体,就是指这里所说的数据库管理系统. 完整的Ora ...
- SPOJ1043 GSS1(线段树)
题意 给出$n$个数,每次询问区间$(l, r)$内最大字段和 Sol 在合并子树的时候,答案仅有四种情况 打四个标记维护即可 查询同理,用类似update的方式合并 注意查询的时候不能按照以前的方式 ...
- 【前端_js】js中数字字符串之间的比较
js中字符串间的比较是按照位次优先,比较各字符的ASCII大小,包括数字字符串之间的比较. 1.console.log("1"<"3");//true 2 ...
- 数据追踪系统Zipkin 及其 Zipkin的php客户端驱动hoopak
Zipkin是Twitter的一个开源项目,是一个致力于收集Twitter所有服务的监控数据的分布式跟踪系统,它提供了收集数据,和查询数据两大接口服务.Zipkin 是一款开源的分布式实时数据追踪系统 ...
- 传送流(TS)的基础知识
数字电视的TS包和TS流的组成和功能 综合考虑几下几个因素: (1)包的长度不能过短,否则包头开销所占比例过大, 导致传输效率下降 (2)包的长度不能过长,否则在丢失同步的情况下恢复同步的 周期过长, ...