首页 > 其他 > 详细

table th表头固定属性设定

时间:2020-08-10 12:43:46      阅读:380      评论:0      收藏:0      [点我收藏+]
/*设置滚动属性*/

tbody {

display: block;

max-height: 400px;

overflow-y: scroll;

}



/*设置头与内容自动对齐*/

table thead,tfoot,tbody tr {

display: table;

width: 100%;

table-layout: fixed;

}



/*给滚动条预留宽度*/

table thead,tfoot {

width: calc( 100% - 1em);

background: #EFF0F5;

}

table th表头固定属性设定

原文:https://www.cnblogs.com/cuiguangpeng/p/13468790.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!