PHP8.1.21版本已发布
vue8.1.21版本已发布
jquery8.1.21版本已发布

CSS实现表头固定的可滚动表格的浏览器兼容问题_html/css_WEB-ITnose

原创
2016-06-24 12:25:47 1615浏览

我想作一个表头固定、表身可滚动的表格。从网上搜来一个例子如下:

http://www.imaputz.com/cssStuff/bigFourVersion.html
http://stackoverflow.com/questions/13043837/scrollable-table-with-fixed-header

经过调整,在Firefox、Chrome和IE10下好用,但在IE8、IE9和IE11里不好用。症状是tboytboy部分不能滚动(没有滚动条)。表格外边的container可以有滚动条,但表头会和表身一起滚动。

请问有没有好办法解决这浏览器一兼容问题?谢谢!

(从明天起休假一周,回来后结账)

Untitled Document

Pure CSS Scrollable Table with Fixed Header

Using CSS to allow scrolling within a single HTML table



Header 1 Header 2 Header 3
Cell Content 1 1 Cell Content 1 2 Cell Content 1 3
Cell Content 2 1 Cell Content 2 2 Cell Content 2 3
Cell Content 3 1 Cell Content 3 2 Cell Content 3 3
Cell Content 4 1 Cell Content 4 2 Cell Content 4 3
Cell Content 5 1 Cell Content 5 2 Cell Content 5 3
Cell Content 6 1 Cell Content 6 2 Cell Content 6 3
Cell Content 7 1 Cell Content 7 2 Cell Content 7 3
Cell Content 8 1 Cell Content 8 2 Cell Content 8 3
Cell Content 9 1 Cell Content 9 2 Cell Content 9 3
Cell Content 10 1 Cell Content 10 2 Cell Content 10 3
Cell Content 11 1 Cell Content 11 2 Cell Content 11 3
Cell Content 12 1 Cell Content 12 2 Cell Content 12 3
Cell Content 13 1 Cell Content 13 2 Cell Content 13 3
Cell Content 14 1 Cell Content 14 2 Cell Content 14 3
Cell Content 15 1 Cell Content 15 2 Cell Content 15 3


回复讨论(解决方案)

没人回复。是问题太难了,还是我的人品太差?

完全复制表
一张在下面滚动
一张外面包个div 只显示表头 叠在上面

多谢KK3K2005热心回复!

用两个同样的表?能说得再详细一点吗?我用在ASP.NET网页中。

声明:本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系admin@php.cn核实处理。