http://HdhCmsTestimaputz测试数据/cssStuff/bigFourVersion.html
http://stackoverflow测试数据/questions/13043837/scrollable-table-with-fixed-header
经过调整,在Firefox、Chrome和IE10下好用,但在IE8、IE9和IE11里不好用。症状是tboytboy部分不能滚动(没有滚动条)。表格外边的container可以有滚动条,但表头会和表身一起滚动。
请问有没有好办法解决这浏览器一兼容问题?谢谢!
(从明天起休假一周,回来后结账)
Untitled Document *{ margin:0; padding:0; }div.tableContainer { clear: both; border: 0px solid #963; height: 420px; /* html>body tbody.scrollContent height plus 23px for the header */ overflow: auto; width: 756px /* Remember to leave 16px for the scrollbar! */}/* define width of table. IE browsers only */div.tableContainer table { float: left; width: 740px; border-collapse:collapse; border: 1px solid #76a0ae; background-color: #ddd2e5;}div.tableContainer table tr{ height:33px;}/*html>body */tbody.scrollContent { margin-top:10px; display: block; height: 352px; overflow: auto; width: 100%; background-color: #eeeeee;}tbody td { height: 32px;}/*html>body */thead.fixedHeader tr { display: block; background-color: #ddd2e5;}/*html>body */thead.fixedHeader th { /* TH 1 */ border: 1px solid #76a0ae; width: 180px; height:40px;}/*html>body */thead.fixedHeader th + th { /* TH 2 */ width: 240px;}/*html>body */thead.fixedHeader th + th + th { /* TH 3 +16px for scrollbar */ width: 336px;}/*html>body */tbody.scrollContent td { /* TD 1 */ border: 1px solid #76a0ae; width: 180px; height:33px;}/*html>body */tbody.scrollContent td + td { /* TD 2 */ width: 240px;}/*html>body */tbody.scrollContent td + td + td { /* TD 3 +16px for scrollbar */ width: 320px;}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
查看更多关于CSS实现表头固定的可滚动表格的浏览器兼容问题_html/css_WEB-ITnose的详细内容...
声明:本文来自网络,不代表【好得很程序员自学网】立场,转载请注明出处:http://haodehen.cn/did102981