{"id":2594,"date":"2018-09-10T11:09:26","date_gmt":"2018-09-10T03:09:26","guid":{"rendered":"https:\/\/www.webteach.tw\/?p=2594"},"modified":"2018-09-10T11:09:26","modified_gmt":"2018-09-10T03:09:26","slug":"css-table-thead-fixed-%e8%b3%87%e6%96%99%e8%a1%a8-%e8%a1%a8%e9%a0%ad%e5%9b%ba%e5%ae%9a","status":"publish","type":"post","link":"https:\/\/www.webteach.tw\/?p=2594","title":{"rendered":"[ CSS ] &#8211; Table Thead Fixed \u8cc7\u6599\u8868 \u8868\u982d\u56fa\u5b9a"},"content":{"rendered":"<p>\u627e\u4e86\u597d\u4e45\u7d42\u65bc\u627e\u5230\u4e00\u500b\u53ef\u8996\u6027\u6700\u597d\u7684\u89e3\u6cd5 Table Thead Fixed \u9019\u500b\u9700\u6c42\u53ea\u8981\u662f\u6709\u8cc7\u6599\u5831\u8868\u5c31\u4e00\u5b9a\u6703\u7528\u5230\uff0c\u4e4b\u524d\u7684\u4f5c\u6cd5 <a href=\"https:\/\/www.webteach.tw\/?p=701\" rel=\"noopener noreferrer\" target=\"_blank\">https:\/\/www.webteach.tw\/?p=701<\/a> \u8cc7\u6599\u9805\u76ee\u5c11\u7684\u6642\u5019\u9084\u53ef\u4ee5\u7528\uff0c\u4f46\u53ea\u8981\u4e00\u591a\u9084\u662f\u6703\u8dd1\u7248\u3002<br \/>\n\u6700\u8fd1\u641c\u5c0b\u5230\u9019\u7bc7 <a href=\"https:\/\/www.cnblogs.com\/webSong\/p\/6242444.html\" rel=\"noopener noreferrer\" target=\"_blank\">https:\/\/www.cnblogs.com\/webSong\/p\/6242444.html<\/a> \u7d93\u6e2c\u8a66\u53ef\u8996\u6027\u597d\u592a\u591a\u4e86\uff0c\u96d6\u7136\u5728\u8655\u7406 colspan \u6b04\u4f4d\u6642\u9084\u662f\u6703\u5c0f\u8dd1\u7248\u4f46\u9084\u5728\u53ef\u63a5\u53d7\u7684\u7bc4\u570d\u3002<br \/>\n\u5099\u4efd\u4e00\u4e0b\u8a9e\u6cd5<br \/>\n[css]<br \/>\n&amp;lt;style&amp;gt;<br \/>\ntable tbody {<br \/>\ndisplay:block;<br \/>\nheight:400px;<br \/>\noverflow-y:scroll;<br \/>\n}<br \/>\ntable thead, tbody tr {<br \/>\ndisplay:table;<br \/>\nwidth:100%;<br \/>\ntable-layout:fixed;<br \/>\n}<br \/>\ntable thead {<br \/>\nwidth: calc( 100% &#8211; 1em )<br \/>\n}<br \/>\ntable thead th{ background:#ccc;}<br \/>\n&amp;lt;\/style&amp;gt;<br \/>\n[\/css]<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u627e\u4e86\u597d\u4e45\u7d42\u65bc\u627e\u5230\u4e00\u500b\u53ef\u8996\u6027\u6700\u597d\u7684\u89e3\u6cd5 Table &#8230;<\/p>\n","protected":false},"author":1,"featured_media":3767,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[23],"tags":[190,553],"class_list":["post-2594","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-css","tag-css","tag-table-thead-fixed","hvn-theme-has-thumbnail"],"_links":{"self":[{"href":"https:\/\/www.webteach.tw\/index.php?rest_route=\/wp\/v2\/posts\/2594","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.webteach.tw\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.webteach.tw\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.webteach.tw\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.webteach.tw\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=2594"}],"version-history":[{"count":0,"href":"https:\/\/www.webteach.tw\/index.php?rest_route=\/wp\/v2\/posts\/2594\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.webteach.tw\/index.php?rest_route=\/wp\/v2\/media\/3767"}],"wp:attachment":[{"href":"https:\/\/www.webteach.tw\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=2594"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.webteach.tw\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=2594"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.webteach.tw\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=2594"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}