<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>
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/?_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单元格内容过多换行显示
原创
©著作权归作者所有:来自51CTO博客作者啄木鸟伍迪_的原创作品,请联系作者获取转载授权,否则将追究法律责任
提问和评论都可以,用心的回复会被更多人看到
评论
发布评论
相关文章
-
poi-tl导出复杂word(图片、表格(合并单元格、嵌套图片)、文字)
java导出复杂word
List java 图片处理 -
table 中,如何使得单元格的内容不换行,单元格不被撑开
table-layout:fixed 阿罗裤剪短发了 阿罗裤剪短发了 阿罗裤剪短发了
table 中 如何使得单元格的内容不换行 单元格不被撑开 table-layout:fixed -
EXCEL 单元格换行
Alt +Enter
excel技巧 单元格换行 -
table的宽度,单元格内换行问题
选择自 chnking 的 Blog 一. 要想固定table的总的宽度和每列的宽度: 或在脚本中: this.style.tableL
html asp.net 功能类 javascript 客户端 -
python excel单元格 python excel单元格换行
在我们优化过程中,无论是信息流还是SEM都需要做数据分析,于是,不可避免我们会经常用到Excel表格,如果能掌握一些技巧,一定会让你的工作事半功倍,今天主要围绕Excel技巧来做分享。本次讲解依然是提纲,图文部分引用自百度经验。快捷键Excel的快捷键很多,以下主要是能提高效率:Crtl+方向键,对单元格光标快速移动,移动到数据边缘(空格位置)。Crtl+Shift+方向键,对单元格快读框选,选择
python excel单元格 excel python插件 excel 模糊查找sql excel决策树 vb用sql方法读取excel的表名 -
javascript 表格 javascript 表格单元格内容换行
尝试过使用n,效果变成整行换行了,如何让某个单元格里的内容换行?使用a标签方式将json导出csv文件
js导出excel单元格内换行符代码 json Data a标签
















