修正了html表格标题的滚动而不影响标题大小的问题

修正了html表格标题的滚动而不影响标题大小的问题,html,css,performance,Html,Css,Performance,我试图修复html表格的标题并滚动表格主体的其余部分。 为了修复列,我使用了以下css,但问题是它会干扰标题的列大小 <style type="text/css"> div.tableContainer { clear: both; border: 1px solid #963; height: 300px; overflow: hidden; width: 1000p

我试图修复html表格的标题并滚动表格主体的其余部分。 为了修复列,我使用了以下css,但问题是它会干扰标题的列大小

    <style type="text/css">
      div.tableContainer 
       {
        clear: both;
        border: 1px solid #963;
        height: 300px;
        overflow: hidden;
        width: 1000px
       }

        html>body thead.fixedHeader tr 
        {
        display: block
       }


   thead.fixedHeader th 
    {

        background: #C96;
    border-left: 1px solid #EB8;
    border-right: 1px solid #B74;
    border-top: 1px solid #EB8;
    font-weight: normal;
    padding: 4px 3px;
    text-align: left
        position: relative
        width: 200px

    }

        html>body tbody.scrollContent {
        display: block;
        height: 300px;
        overflow: auto;
        width: 100%

       }

     tbody.scrollContent td, tbody.scrollContent tr.normalRow td {

        background: #FFF;
    border-bottom: none;
    border-left: none;
    border-right: 1px solid #CCC;
    border-top: 1px solid #DDD;
        padding: 2px 3px 3px 4px

      }

       html>body thead.fixedHeader th +th {
    width: 50px
       }


     </style>

桌子容器
{
明确:两者皆有;
边框:1px实心#963;
高度:300px;
溢出:隐藏;
宽度:1000px
}
html>body thead.fixedHeader tr
{
显示:块
}
thead.fixedHeader th
{
背景:C96;
左边框:1px实心#EB8;
右边框:1px实心#B74;
边框顶部:1px实心#EB8;
字体大小:正常;
填充物:4px 3px;
文本对齐:左对齐
职位:相对
宽度:200px
}
html>body tbody.scrollContent{
显示:块;
高度:300px;
溢出:自动;
宽度:100%
}
tbody.scrollContent td,tbody.scrollContent tr.normalRow td{
背景:#FFF;
边框底部:无;
左边界:无;
右边框:1px实心#CCC;
边框顶部:1px实心#DDD;
填充:2件3件3件4件
}
html>正文thead.fixedHeader th+th{
宽度:50像素
}

将标题放在一个单独的表中,将内容放在另一个表中,但将两个表放在一起,使其看起来像一个表

<table>
put headers here.
</table>
<table>
put content here.
</table>

把标题放在这里。
把内容放在这里。

将标题放在一个单独的表中,将内容放在另一个表中,但将两个表放在一起,使其看起来像一个表

<table>
put headers here.
</table>
<table>
put content here.
</table>

把标题放在这里。
把内容放在这里。
相关帖子

(一)

(二)

(三)

4) 你们可以在html页面中找到css,若你们检查它的话

希望它能对你相关的帖子有所帮助

(一)

(二)

(三)

4) 你们可以在html页面中找到css,若你们检查它的话


希望它能帮助你

尝试使用css属性溢出:覆盖

尝试使用css属性溢出:覆盖

看看这个线程,看看这个线程,