本文摘自PHP中文网,作者尚,侵删。

使用layui流加载,CSS解决如何固定表头,以及解决表格表头和表格内容对不齐问题。
HTML代码:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | < table class = "layui-table" >
< thead class = "top-head" >
< tr >
@for(var item in zkColumnDescs){
@if(item.field != 'equipId'){
< th class = "thead-tr-width" >${item.title}</ th >
< input type = "hidden" value = "${item.field}" />
@}
@}
</ tr >
</ thead >
< tbody id = "LAY_demo1" >
</ tbody >
</ table >
|
js代码:
阅读剩余部分
相关阅读 >>
layui模块化与非模块化的不同引用方式介绍
layui是什么
layui是开源的吗
layui的分页怎么用
layui封装模块教程
怎么用layui实现图片上传
让layui支持es5写法的方法介绍
让layui支持wangeditor编辑器的方法
layui时间控件选择时间
layui使用入门教程
更多相关阅读请进入《layui》频道 >>
人民邮电出版社
本书对 Vue.js 3 技术细节的分析非常可靠,对于需要深入理解 Vue.js 3 的用户会有很大的帮助。——尤雨溪,Vue.js作者
转载请注明出处:木庄网络博客 » layui表格怎么把表头固定