{"id":3572,"date":"2024-11-10T12:34:14","date_gmt":"2024-11-10T04:34:14","guid":{"rendered":"https:\/\/fwq.ai\/blog\/3572\/"},"modified":"2024-11-10T12:34:14","modified_gmt":"2024-11-10T04:34:14","slug":"%e5%be%ae%e4%bf%a1%e5%b0%8f%e7%a8%8b%e5%ba%8f-tdesign-ui-%e5%ba%93%e4%b8%ad%e7%9a%84-css-%e9%80%89%e6%8b%a9%e5%99%a8%e4%b8%ba%e4%bd%95%e5%a6%82%e6%ad%a4%e7%89%b9%e6%ae%8a%ef%bc%9f","status":"publish","type":"post","link":"https:\/\/fwq.ai\/blog\/3572\/","title":{"rendered":"\u5fae\u4fe1\u5c0f\u7a0b\u5e8f TDesign UI \u5e93\u4e2d\u7684 CSS \u9009\u62e9\u5668\u4e3a\u4f55\u5982\u6b64\u7279\u6b8a\uff1f"},"content":{"rendered":"<p><img decoding=\"async\" src=\"https:\/\/img.php.cn\/upload\/article\/001\/246\/273\/173106163950369.jpg\" class=\"aligncenter\" title=\"\u5fae\u4fe1\u5c0f\u7a0b\u5e8f TDesign UI \u5e93\u4e2d\u7684 CSS \u9009\u62e9\u5668\u4e3a\u4f55\u5982\u6b64\u7279\u6b8a\uff1f\u63d2\u56fe\" alt=\"\u5fae\u4fe1\u5c0f\u7a0b\u5e8f TDesign UI \u5e93\u4e2d\u7684 CSS \u9009\u62e9\u5668\u4e3a\u4f55\u5982\u6b64\u7279\u6b8a\uff1f\u63d2\u56fe\" \/><\/p>\n<p><strong>\u5c0f\u7a0b\u5e8f tdesign ui \u5e93\u4e2d\u7684  \u9009\u62e9\u5668\u63a2\u79d8<\/strong><\/p>\n<p>\u5728\u4f7f\u7528\u5fae\u4fe1\u5c0f\u7a0b\u5e8f\u7684 TDesign UI \u5e93\u65f6\uff0c\u7528\u6237\u6709\u65f6\u4f1a\u5bf9 CSS \u9009\u62e9\u5668\u4ea7\u751f\u7591\u60d1\uff0c\u5982:<\/p>\n<p>DOM \u7ed3\u6784\u4e2d\uff0c\u5143\u7d20 class \u662f &#8216;t-grid t-card class t-class&#8217;,\u4f46\u662f\u9009\u62e9\u5668\u662f &#8216;.t-grid&#8211;card&#8217;<br \/>\u8fd9\u662f\u5982\u4f55\u751f\u6548\u7684\uff1f\u8fd9\u4e2a\u5199\u6cd5\u4e5f\u4ee4\u4eba\u7591\u60d1\uff0c\u65e2\u50cf\u662f BEM \u547d\u540d\u53c8\u50cf\u662f CSS \u53d8\u91cf\uff0c\u4f46\u4f3c\u4e4e\u90fd\u4e0d\u662f\u3002<\/p>\n<p><strong>\u6df1\u5165\u89e3\u6790\uff1a<\/strong><\/p>\n<p>1. <strong>\u5916\u90e8\u6837\u5f0f\u7c7b\u5f15\u5165\uff1a<\/strong><\/p>\n<p>.t-grid&#8211;card \u9009\u62e9\u5668\u5b9e\u9645\u4e0a\u662f\u901a\u8fc7\u5c0f\u7a0b\u5e8f\u5f00\u53d1\u4e2d\u7684\u5916\u90e8\u6837\u5f0f\u7c7b\u4f20\u5165\u7684\uff0c\u4e5f\u5c31\u662f class \u4e2d\u7684 t-class\u3002<\/p>\n<p>2. <strong>BEM \u547d\u540d\u89c4\u8303\uff1a<\/strong><\/p>\n<p>TDesign \u4e2d\u4f7f\u7528\u7684\u786e\u5b9e\u662f BEM \u547d\u540d\u98ce\u683c\u3002\u5728\u771f\u5b9e\u9879\u76ee\u4e2d\u4f7f\u7528 BEM \u547d\u540d\u65f6\uff0c\u53ef\u4ee5\u9002\u5f53\u7b80\u5316 class \u540d\u79f0\u957f\u5ea6\uff0c\u4e0d\u4e00\u5b9a\u9700\u8981\u4e25\u683c\u6309\u7167 DOM \u7ed3\u6784\u6dfb\u52a0\u540e\u7f00\u3002<\/p>\n<p>3. <strong>CSS \u53d8\u91cf\uff1a<\/strong><\/p>\n<p>CSS \u53d8\u91cf\u4ee5 &#8212; \u5f00\u5934\u58f0\u660e\uff0c\u5e76\u901a\u8fc7 var() \u4f7f\u7528\uff0c\u4e0e\u672c\u4f8b\u4e2d\u7684\u5199\u6cd5\u4e0d\u7b26\u3002<\/p>\n<p>\u4ee5\u4e0a\u5c31\u662f\u5c0f\u7a0b\u5e8f TDesign UI \u5e93\u4e2d\u7684 CSS \u9009\u62e9\u5668\u4e3a\u4f55\u5982\u6b64\u7279\u6b8a\uff1f\u7684\u8be6\u7ec6\u5185\u5bb9\uff0c\u66f4\u591a\u8bf7\u5173\u6ce8\u7c73\u4e91\u5176\u5b83\u76f8\u5173\u6587\u7ae0\uff01<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u5c0f\u7a0b\u5e8f tdesign ui \u5e93\u4e2d\u7684 \u9009\u62e9\u5668\u63a2\u79d8 \u5728\u4f7f\u7528\u5fae\u4fe1\u5c0f\u7a0b\u5e8f\u7684 TDesign UI \u5e93\u65f6\uff0c\u7528\u6237\u6709\u65f6\u4f1a\u5bf9 CSS \u9009\u62e9\u5668\u4ea7\u751f\u7591\u60d1\uff0c\u5982: DOM \u7ed3\u6784\u4e2d\uff0c\u5143\u7d20 class \u662f &#8216;t-grid t-card class t-class&#8217;,\u4f46\u662f\u9009\u62e9\u5668\u662f &#8216;.t-grid&#8211;card&#8217;\u8fd9\u662f\u5982\u4f55\u751f\u6548\u7684\uff1f\u8fd9\u4e2a\u5199\u6cd5\u4e5f\u4ee4\u4eba\u7591\u60d1\uff0c\u65e2\u50cf\u662f BEM \u547d\u540d\u53c8\u50cf\u662f CSS \u53d8\u91cf\uff0c\u4f46\u4f3c\u4e4e\u90fd\u4e0d\u662f\u3002 \u6df1\u5165\u89e3\u6790\uff1a 1. \u5916\u90e8\u6837\u5f0f\u7c7b\u5f15\u5165\uff1a .t-grid&#8211;card \u9009\u62e9\u5668\u5b9e\u9645\u4e0a\u662f\u901a\u8fc7\u5c0f\u7a0b\u5e8f\u5f00\u53d1\u4e2d\u7684\u5916\u90e8\u6837\u5f0f\u7c7b\u4f20\u5165\u7684\uff0c\u4e5f\u5c31\u662f class \u4e2d\u7684 t-class\u3002 2. BEM \u547d\u540d\u89c4\u8303\uff1a TDesign \u4e2d\u4f7f\u7528\u7684\u786e\u5b9e\u662f BEM \u547d\u540d\u98ce\u683c\u3002\u5728\u771f\u5b9e\u9879\u76ee\u4e2d\u4f7f\u7528 BEM \u547d\u540d\u65f6\uff0c\u53ef\u4ee5\u9002\u5f53\u7b80\u5316 class \u540d\u79f0\u957f\u5ea6\uff0c\u4e0d\u4e00\u5b9a\u9700\u8981\u4e25\u683c\u6309\u7167 DOM \u7ed3\u6784\u6dfb\u52a0\u540e\u7f00\u3002 3. CSS \u53d8\u91cf\uff1a CSS \u53d8\u91cf\u4ee5 &#8212; \u5f00\u5934\u58f0\u660e\uff0c\u5e76\u901a\u8fc7 var() \u4f7f\u7528\uff0c\u4e0e\u672c\u4f8b\u4e2d\u7684\u5199\u6cd5\u4e0d\u7b26\u3002 \u4ee5\u4e0a\u5c31\u662f\u5c0f\u7a0b\u5e8f [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[16],"tags":[],"class_list":["post-3572","post","type-post","status-publish","format-standard","hentry","category-16"],"_links":{"self":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/3572","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/comments?post=3572"}],"version-history":[{"count":0,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/3572\/revisions"}],"wp:attachment":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/media?parent=3572"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/categories?post=3572"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/tags?post=3572"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}