Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/css/38.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Html 冻结/固定台面不再符合IE10的要求_Html_Css_Fixed Header Tables - Fatal编程技术网

Html 冻结/固定台面不再符合IE10的要求

Html 冻结/固定台面不再符合IE10的要求,html,css,fixed-header-tables,Html,Css,Fixed Header Tables,我需要你的帮助 在IE7中,用于冻结HTML表顶行(标题)的方法如下: #data tr th { top: expression(this.offsetParent.scrollTop); position: relative; } IE10似乎不再是这样了。也就是说,如何修改我现有的编码,使我能够像“好时光”lol一样冻结表的顶部标题行 我在这里做了一把小提琴: 以下是CSS标记: #data_container { height: 160p

我需要你的帮助

在IE7中,用于冻结HTML表顶行(标题)的方法如下:

#data tr th {
        top: expression(this.offsetParent.scrollTop);
        position: relative;
}
IE10似乎不再是这样了。也就是说,如何修改我现有的编码,使我能够像“好时光”lol一样冻结表的顶部标题行

我在这里做了一把小提琴:

以下是CSS标记:

#data_container {
        height: 160px;
        border: 1px solid #808080;

        scrollbar-base-color: #DFDFDF;
        scrollbar-arrow-color: #235A81;
        overflow-y: scroll;
        overflow-x: scroll;
        margin-top: 5px;
        padding:0px;
        position: relative;
}

#data {
        color: rgb(11,63,113);
        border: 0px;
        width: 100%;
        cursor: default;    
        table-layout: fixed;

        margin:0px;
        border:0px;
        border-collapse:collapse;
}
#data th {
        height: 18px;
        cursor: pointer;
        padding: 3px;
        width: 140px;
        border-top: none;
        border-bottom: 1px solid rgb(128,128,128);
        border-right: 1px solid rgb(128,128,128);
}
#data td {
        padding: 3px;
        border-right: 1px solid rgb(128,128,128);
        border-bottom: 1px solid rgb(128,128,128);
}
#data th:hover {
        text-decoration: underline;

}
#data tr th {
        top: expression(this.offsetParent.scrollTop);
        position: relative;
}
#data th:first-child {
    border-left: 0;
}