1200字范文,内容丰富有趣,写作的好帮手!
1200字范文 > HTML table表头在左侧 HTML Table锁定表头(CSS实现)

HTML table表头在左侧 HTML Table锁定表头(CSS实现)

时间:2018-08-12 14:57:00

相关推荐

HTML table表头在左侧 HTML Table锁定表头(CSS实现)

css+html实现固定表头

#scrollTable {

width:701px;

border: 1px solid #EB8;/*table没有外围的border,只有内部的td或th有border*/

background: #FF8C00;

}

#scrollTable table {

border-collapse:collapse; /*统一设置两个table为细线表格*/

}

/*表头 div的第一个子元素**/

#scrollTable table.thead{

width:100%;

}

/*表头*/

#scrollTable table.thead th{

border: 1px solid #EB8;

border-right:#C96;

color:#fff;

background: #FF8C00;/*亮桔黄色*/

}

/*能带滚动条的表身*/

/*div的第二个子元素*/

#scrollTable div{

width:100%;

height:200px;

overflow:auto;/*必需*/

scrollbar-face-color:#EB8;/*那三个小矩形的背景色*/

scrollbar-base-color:#ece9d8;/*那三个小矩形的前景色*/

scrollbar-arrow-color:#FF8C00;/*上下按钮里三角箭头的颜色*/

scrollbar-track-color:#ece9d8;/*滚动条的那个活动块所在的矩形的背景色*/

scrollbar-highlight-color:#800040;/*那三个小矩形左上padding的颜色*/

scrollbar-shadow-color:#800040;/*那三个小矩形右下padding的颜色*/

scrollbar-3dlight-color: #EB8;/*那三个小矩形左上border的颜色*/

scrollbar-darkshadow-Color:#EB8;/*那三个小矩形右下border的颜色*/

}

/*能带滚动条的表身的正体*/

#scrollTable table.tbody{

width:100%;

border: 1px solid #C96;

border-right:#B74;

color:#666666;

background: #ECE9D8;

}

/*能带滚动条的表身的格子*/

#scrollTable table.tbody td{

border:1px solid #C96;

}

转自:/muyi8805/article/details/46868529

本内容不代表本网观点和政治立场,如有侵犯你的权益请联系我们处理。
网友评论
网友评论仅供其表达个人看法,并不表明网站立场。