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 ...
随机推荐
- 对ListBox控件中的数据进行排序
实现效果: 知识运用: ListBox控件的Sorted属性 //ListBox控件中的数据项是否按字母顺序排序 public bool Sorted{get;set;} 实现代码: private ...
- 初学HBase的几个问题
转自 http://itindex.net/detail/50571-hbase-%E9%97%AE%E9%A2%98 本文主要针对对HBase不了解的人.主要想基于个人的理解回答以下几个问题: 什么 ...
- python 读取mat文件
import osimport scipy.io as sio import numpy as np #matlab文件名 matfn='/home/user/devkit/data/meta_det ...
- iOS 反射函数: performSelector, NSInvocation, objc_msgSend
当我们有方法名和参数列表,想要动态地给对象发送消息,可用通过反射函数机制来实现,有两种常用的做法: 一.performSelector - (id)performSelector:(SEL)aSele ...
- 第30题:LeetCode155. Min Stack最小栈
设计一个支持 push,pop,top 操作,并能在O(1)时间内检索到最小元素的栈. push(x) -- 将元素 x 推入栈中. pop() -- 删除栈顶的元素. top() -- 获取栈顶元素 ...
- A1020 Tree Traversals (25 分)
Suppose that all the keys in a binary tree are distinct positive integers. Given the postorder and i ...
- matplotlib(二)——matplotlib控制坐标轴第一个刻度到原点距离
一.问题描述 具体问题是: 用python库matplotlib进行数据的图表展示: 横坐标是自定义统计值: 保存矢量图(svg),保存后发现横坐的第一个点离坐标原点距离较大,导致图形离y轴较远,让画 ...
- 关于Linux系统下zookeeper集群的搭建
1.集群概述 1.1什么是集群 1.1.1集群概念 集群是一种计算机系统, 它通过一组松散集成的计算机软件和/或硬件连接起来高度紧密地协作完成计算工作.在某种意义上,他们可以被看作是一台计算机.集群系 ...
- Codeforces Round #460 (Div. 2)-B. Perfect Number
B. Perfect Number time limit per test2 seconds memory limit per test256 megabytes Problem Descriptio ...
- JavaScript 计时事件-setInterval()-clearInterval() -setTimeout()-clearTimeout()
(PS:JavaScript 一个设定的时间间隔之后来执行代码,我们称之为计时事件.) JavaScript 计时事件 通过使用 JavaScript,我们有能力做到在一个设定的时间间隔之后来执行代码 ...