{"id":135390,"date":"2020-07-13T09:05:55","date_gmt":"2020-07-13T01:05:55","guid":{"rendered":"http:\/\/4563.org\/?p=135390"},"modified":"2020-07-13T09:05:55","modified_gmt":"2020-07-13T01:05:55","slug":"css-%e9%80%89%e6%8b%a9%e5%99%a8-%e5%8f%af%e4%bb%a5%e8%bf%87%e6%bb%a4%e5%90%8e%e7%9a%84%e9%80%89%e6%8b%a9%e5%90%97%ef%bc%9f","status":"publish","type":"post","link":"http:\/\/4563.org\/?p=135390","title":{"rendered":"css \u9009\u62e9\u5668 \u53ef\u4ee5\u8fc7\u6ee4\u540e\u7684\u9009\u62e9\u5417\uff1f"},"content":{"rendered":"<div>\n<div>\n<div>\n<h1>                  css \u9009\u62e9\u5668 \u53ef\u4ee5\u8fc7\u6ee4\u540e\u7684\u9009\u62e9\u5417\uff1f               <\/h1>\n<p> <\/p>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : coderabbit <\/span>  <span><i><\/i> 29<\/span> <\/div>\n<div> <\/div>\n<\/p><\/div>\n<\/p><\/div>\n<\/p><\/div>\n<div isfirst=\"1\"> <\/p>\n<p>html \u7ed3\u6784\u4f53<\/p>\n<pre><code>&lt;tr&gt; &lt;th class=\"ta-table__cell ta-table__column\"&gt;Postcode&lt;\/th&gt; &lt;th class=\"ta-table__cell ta-table__column\" style=\"text-align: center;\"&gt;Action&lt;\/th&gt;&lt;th class=\"ta-table__cell ta-table__column ta-table__hidden\"&gt;Name&lt;\/th&gt; &lt;th class=\"ta-table__cell ta-table__column ta-table__hidden\"&gt;Age&lt;\/th&gt; &lt;th class=\"ta-table__cell ta-table__column ta-table__hidden\"&gt;Province&lt;\/th&gt; &lt;th class=\"ta-table__cell ta-table__column ta-table__hidden\"&gt;City&lt;\/th&gt; &lt;th class=\"ta-table__cell ta-table__column ta-table__hidden\"&gt;Address&lt;\/th&gt; &lt;\/tr&gt; <\/code><\/pre>\n<p>\u73b0\u5728\u6211\u60f3 \u975e<\/p>\n<pre><code>ta-table__hidden <\/code><\/pre>\n<p>\u7c7b\u7684\u6700\u540e\u4e00\u4e2a\u5143\u7d20\u53bb\u6389\u5b83\u7684\u8fb9\u6846\uff0c \u4e5f\u5c31\u662f Action \u4f8b<\/p>\n<pre><code>border-right-color: transparent <\/code><\/pre>\n<p>\u4f46\u662f\u6211\u901a\u8fc7\u9009\u62e9\u5668\u6392\u9664\u4e0d\u6389\uff0clast-child \u4e5f\u662f\u7236\u5b50\u7684\u6700\u540e\u4e00\u4e2a\u53c8\u5e76\u4e0d\u662f\u6307\u5b9a\u67d0\u4e2a\u5143\u7d20\u7684\u6700\u540e\u4e00\u4e2a\u3002<\/p>\n<\/p><\/div>\n<div> <b>\u5927\u4f6c\u6709\u8a71\u8aaa<\/b> (<span>8<\/span>)        <\/div>\n<div> <\/div>\n<\/p><\/div>\n<\/p><\/div>\n<ul>\n<li data-pid=\"1255428\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : SxqSachin <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             tr th:not(.ta-table__hidden):not(:first-child)                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"1255429\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : maichael <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             @SxqSachin #1 \u4f60\u8fd9\u4e2a\u5f53 Action \u524d\u9762\u6709\u4e0d\u6b62\u4e00\u4e2a\u5143\u7d20\u7684\u65f6\u5019\u5c31\u4e0d\u884c\u4e86\u3002                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"1255430\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : maichael <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u4ee5\u73b0\u6709\u6d4f\u89c8\u5668\u652f\u6301\u505a\u4e0d\u5230\uff0chttps:\/\/caniuse.com\/#feat=css-nth-child-of \u3002\u8fd9\u4e2a\u8bed\u6cd5\u6682\u65f6\u53ea\u6709 safari \u652f\u6301\u3002<\/p>\n<p>\u6240\u4ee5\u53ea\u80fd\u7528 JS \u5b9e\u73b0\u3002\u4e0d\u7136\u5c31\u76f4\u63a5\u7ed9\u90a3\u4e2a\u5143\u7d20\u52a0\u4e00\u4e2a\u989d\u5916\u7684 class \u597d\u4e00\u70b9\u3002                                                            <\/p><\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"1255431\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u4e3b<\/span> <span>\u8cc7\u6df1\u5927\u4f6c : coderabbit <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             @SxqSachin \u8fd9\u4e2a\u4e5f\u6709\u5c40\u9650\u6027\uff0c\u5982\u679c\u6709\u4e09\u4e2a\u6216\u66f4\u591a\u7684 th \u6ca1\u6709 ta-table__column \u5b83\u4e5f\u4e0d\u751f\u6548\u4e86\uff01                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"1255432\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u4e3b<\/span> <span>\u8cc7\u6df1\u5927\u4f6c : coderabbit <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             @maichael \u6211\u52a0\u7684\u989d\u5916\u5143\u7d20\u4e5f\u8981\u9009\u62e9\u6700\u540e\u4e00\u4e2a\u624d\u884c\uff0c\u8981\u4e48\u5199\u4e00\u4e9b\u5224\u65ad\u5b83\u662f\u9690\u85cf\u524d\u6700\u540e\u4e00\u4e2a\u5143\u7d20\uff01                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"1255433\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : 932357832 <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u8fd8\u6ca1\u6709\u53d1\u73b0\u53ef\u884c\u7684\u89e3\u51b3\u65b9\u6848&#8230;<br \/>\u4e0d\u8fc7\u53ef\u4ee5\u8003\u8651\u4e00\u4e0b\u628a\u8fb9\u6846\u7ebf\u505a\u5728\u5de6\u8fb9\uff0c\u8fd9\u6837\u5373\u4f7f\u9690\u85cf\u4e86\u4e5f\u4e0d\u7528\u4e13\u95e8\u5904\u7406\u3002<\/p>\n<p>th + th{<br \/> border-left:1px solid #111;<br \/>}<\/p>\n<p>.ta-table__hidden{<br \/> display:none;<br \/>}                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"1255434\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : SilentDepth <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u5982\u679c\u5141\u8bb8\u4f7f\u7528\u5de6\u8fb9\u6846\uff0c\u5012\u662f\u5bb9\u6613\u8bb8\u591a\uff1a<\/p>\n<p>.ta-table__column:not(.ta-table__hidden) ~ .ta-table__column:not(.ta-table__hidden) {<br \/> border-left: 1px solid #f0f;<br \/>}<\/p>\n<p>\u76ee\u524d CSS \u9009\u62e9\u5668\u603b\u4f53\u4e0a\u662f\u7531\u5916\u5230\u5185\u3001\u7531\u524d\u5230\u540e\u5b9a\u4f4d\u5143\u7d20\u7684\uff0c\u6240\u4ee5\u53cd\u8fc7\u6765\u5c31\u5f88\u96be\u529e\u3002<\/p>\n<p>&#8212;<\/p>\n<p>V2EX \u56de\u5e16\u53d1\u4ee3\u7801\u592a\u96be\u53d7\u4e86\u2026\u2026\u7ad9\u957f\uff08\u6216 V2EX plus \u7684\u4f5c\u8005\uff09\u8003\u8651\u8003\u8651\uff1f                                                            <\/p><\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"1255435\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : rain0002009 <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u8981\u4e0d\u54b1\u6362\u4e2a\u601d\u7ef4<br \/>.ta-table__hidden \u770b\u7740\u611f\u89c9\u662f\u8981\u9690\u85cf\u7684\uff0c\u8981\u4e0d\u54b1\u76f4\u63a5\u5220\u6389\u5b83 \u8fd9\u6837\u9009\u62e9\u5668\u662f\u4e0d\u662f\u5c31\u7b80\u5355\u4e86<br \/>\u6216\u8005\u54b1\u53cd\u5411\u64cd\u4f5c<br \/>\u628a\u6240\u6709\u5143\u7d20\u9690\u85cf\uff0c\u6dfb\u52a0.show \u7684\u5143\u7d20\u624d\u663e\u793a\uff0c\u8fd9\u6837\u662f\u4e0d\u662f\u4e5f\u7b80\u5355\u4e86                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li>\n","protected":false},"excerpt":{"rendered":"<p>css \u9009\u62e9\u5668 \u53ef\u4ee5\u8fc7\u6ee4\u540e\u7684\u9009\u62e9\u5417&hellip;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[],"tags":[],"_links":{"self":[{"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/posts\/135390"}],"collection":[{"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=135390"}],"version-history":[{"count":0,"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/posts\/135390\/revisions"}],"wp:attachment":[{"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=135390"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=135390"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=135390"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}