Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/html/81.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 位置:sticky在ie浏览器中不工作_Html_Css - Fatal编程技术网

Html 位置:sticky在ie浏览器中不工作

Html 位置:sticky在ie浏览器中不工作,html,css,Html,Css,我正在使用bootstrap 3.3.7制作一个表格,在这个表格中,我使用的是固定标题,我给出的位置是:静态,但它在IE中不起作用,请建议任何替代方法 这是我的工作 .tableStyle{ 溢出y:自动; 高度:400px; 边框:1px实心#ccc; } .tableStyle thead th{ 位置:粘性; 排名:0; } .tableStyle thead th{ 背景#f1f1; 颜色:#333; } 简单边栏-启动引导模板 桌子 .table responsive类创建一个响应

我正在使用bootstrap 3.3.7制作一个表格,在这个表格中,我使用的是固定标题,我给出的位置是:静态,但它在IE中不起作用,请建议任何替代方法

这是我的工作

.tableStyle{
溢出y:自动;
高度:400px;
边框:1px实心#ccc;
}
.tableStyle thead th{
位置:粘性;
排名:0;
}
.tableStyle thead th{
背景#f1f1;
颜色:#333;
}

简单边栏-启动引导模板
桌子
.table responsive类创建一个响应表,它将在小型设备(768px以下)上水平滚动。在任何大于768px宽的物体上观看时,没有区别:

# 名字 姓氏 年龄 城市 国 1. 安娜 皮特 35 纽约 美国 2. 安娜 皮特 35 纽约 美国 3. 安娜 皮特 35 纽约 美国

您只需使用
position:fixed
,而不是
position:sticky
。它可以在chrome中工作,Mozilla不能在IE-7中工作。我只是在这里更正您的代码。

位置:IE不支持粘性
-如果您转到该页面上的“资源”选项卡,您可以选择使用2个多边形填充。可能重复
.tableStyle thead th {
  position: sticky;
  top: 0;
}