{"id":3589,"date":"2024-11-10T09:51:21","date_gmt":"2024-11-10T01:51:21","guid":{"rendered":"https:\/\/fwq.ai\/blog\/3589\/"},"modified":"2024-11-10T09:51:21","modified_gmt":"2024-11-10T01:51:21","slug":"%e5%be%ae%e4%bf%a1%e5%b0%8f%e7%a8%8b%e5%ba%8f-tdesign-ui-%e5%ba%93%e4%b8%ad-css-%e9%80%89%e6%8b%a9%e5%99%a8%ef%bc%9a-t-grid-card-%e5%a6%82%e4%bd%95%e7%94%9f%e6%95%88%ef%bc%9f","status":"publish","type":"post","link":"https:\/\/fwq.ai\/blog\/3589\/","title":{"rendered":"\u5fae\u4fe1\u5c0f\u7a0b\u5e8f TDesign UI \u5e93\u4e2d CSS \u9009\u62e9\u5668\uff1a&#8217;.t-grid&#8211;card&#8217; \u5982\u4f55\u751f\u6548\uff1f"},"content":{"rendered":"<p><img decoding=\"async\" src=\"https:\/\/img.php.cn\/upload\/article\/001\/246\/273\/173106524597515.jpg\" class=\"aligncenter\" title=\"\u5fae\u4fe1\u5c0f\u7a0b\u5e8f TDesign UI \u5e93\u4e2d CSS \u9009\u62e9\u5668\uff1a&#8217;.t-grid&#8211;card&#8217; \u5982\u4f55\u751f\u6548\uff1f\u63d2\u56fe\" alt=\"\u5fae\u4fe1\u5c0f\u7a0b\u5e8f TDesign UI \u5e93\u4e2d CSS \u9009\u62e9\u5668\uff1a&#8217;.t-grid&#8211;card&#8217; \u5982\u4f55\u751f\u6548\uff1f\u63d2\u56fe\" \/><\/p>\n<p><strong>\u5c0f\u7a0b\u5e8f tdesign ui \u5e93\u4e2d\u7684  \u9009\u62e9\u5668\u7591\u95ee<\/strong><\/p>\n<p>\u95ee\u9898\u63cf\u8ff0\uff1a<\/p>\n<p>\u5728\u5c0f\u7a0b\u5e8f\u4e2d\u4f7f\u7528 TDesign UI \u5e93\u65f6\uff0c\u5f00\u53d1\u8005\u9047\u5230\u4e00\u4e2a\u4ee4\u4eba\u56f0\u60d1\u7684 CSS \u9009\u62e9\u5668\uff1a<\/p>\n<\/p>\n<p>\u5982\u56fe\uff0cDOM\u7ed3\u6784\u4e2d\uff0c\u5143\u7d20class \u662f <code>'t-grid t-card class t-class'<\/code>,\u4f46\u662f\u9009\u62e9\u5668\u662f <code>'.t-grid--card'<\/code><br \/>\u8fd9\u600e\u4e48\u751f\u6548\u7684\uff1f\u8fd9\u4e2a\u5199\u6cd5\u4e5f\u8ba9\u6211\u7591\u60d1\uff0c\u50cfBEM\u547d\u540d\u53c8\u50cf\u662fCSS\u53d8\u91cf\uff0c\u4f46\u597d\u50cf\u90fd\u4e0d\u662f\u3002<br \/>\u5e0c\u671b\u6709\u5927\u4f6c\u89e3\u60d1\u3002<\/p>\n<p>\u95ee\u9898\u89e3\u7b54\uff1a<\/p>\n<p><span>\u7acb\u5373\u5b66\u4e60<\/span>\u201c\u201d\uff1b<\/p>\n<p>&#8216;.t-grid&#8211;card&#8217; \u9009\u62e9\u5668\u7684\u751f\u6548\u539f\u7406\u5982\u4e0b\uff1a<\/p>\n<ul>\n<li>t-class \u7c7b\u540d\uff1a\u8fd9\u662f\u5c0f\u7a0b\u5e8f\u5f00\u53d1\u4e2d\u7684\u4e00\u79cd\u5916\u90e8\u6837\u5f0f\u7c7b\uff0c\u8868\u793a\u8be5\u5143\u7d20\u5c06\u4f7f\u7528\u8be5\u6837\u5f0f\u7c7b\u5b9a\u4e49\u7684\u6837\u5f0f\u3002<\/li>\n<li>\n<p>BEM \u547d\u540d\u98ce\u683c\uff1a.t-grid&#8211;card \u91c7\u7528\u4e86 BEM \u547d\u540d\u98ce\u683c\uff0c\u5176\u4e2d:<\/p>\n<ul>\n<li>t-grid: \u8868\u793a\u5143\u7d20\u7684\u5757\uff08block\uff09\u540d\u79f0<\/li>\n<li>&#8211;card: \u8868\u793a\u5143\u7d20\u7684\u5143\u7d20\uff08element\uff09\u540d\u79f0<\/li>\n<\/ul>\n<p>\u5728\u5b9e\u9645\u9879\u76ee\u4e2d\u4f7f\u7528 BEM \u547d\u540d\u65f6\uff0c\u4e0d\u4e00\u5b9a\u9700\u8981\u4e25\u683c\u6309\u7167 DOM \u7ed3\u6784\u589e\u52a0\u540e\u7f00\u3002\u4e3a\u4e86\u7f29\u51cf class \u540d\u79f0\u957f\u5ea6\uff0c\u53ef\u4ee5\u6839\u636e\u56e2\u961f\u7684\u547d\u540d\u89c4\u8303\u8fdb\u884c\u5408\u7406\u8c03\u6574\u3002<\/p>\n<\/li>\n<li>CSS \u53d8\u91cf\uff1a&#8211;card \u90e8\u5206\u4e0d\u662f CSS \u53d8\u91cf\uff0cCSS \u53d8\u91cf\u662f\u4ee5 &#8212; \u5f00\u5934\u58f0\u660e\u5e76\u4e14\u901a\u8fc7 var() \u4f7f\u7528\u3002<\/li>\n<\/ul>\n<p>\u4ee5\u4e0a\u5c31\u662f\u5c0f\u7a0b\u5e8f TDesign UI \u5e93\u4e2d CSS \u9009\u62e9\u5668\uff1a&#8217;.t-grid&#8211;card&#8217; \u5982\u4f55\u751f\u6548\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\u7591\u95ee \u95ee\u9898\u63cf\u8ff0\uff1a \u5728\u5c0f\u7a0b\u5e8f\u4e2d\u4f7f\u7528 TDesign UI \u5e93\u65f6\uff0c\u5f00\u53d1\u8005\u9047\u5230\u4e00\u4e2a\u4ee4\u4eba\u56f0\u60d1\u7684 CSS \u9009\u62e9\u5668\uff1a \u5982\u56fe\uff0cDOM\u7ed3\u6784\u4e2d\uff0c\u5143\u7d20class \u662f &#8216;t-grid t-card class t-class&#8217;,\u4f46\u662f\u9009\u62e9\u5668\u662f &#8216;.t-grid&#8211;card&#8217;\u8fd9\u600e\u4e48\u751f\u6548\u7684\uff1f\u8fd9\u4e2a\u5199\u6cd5\u4e5f\u8ba9\u6211\u7591\u60d1\uff0c\u50cfBEM\u547d\u540d\u53c8\u50cf\u662fCSS\u53d8\u91cf\uff0c\u4f46\u597d\u50cf\u90fd\u4e0d\u662f\u3002\u5e0c\u671b\u6709\u5927\u4f6c\u89e3\u60d1\u3002 \u95ee\u9898\u89e3\u7b54\uff1a \u7acb\u5373\u5b66\u4e60\u201c\u201d\uff1b &#8216;.t-grid&#8211;card&#8217; \u9009\u62e9\u5668\u7684\u751f\u6548\u539f\u7406\u5982\u4e0b\uff1a t-class \u7c7b\u540d\uff1a\u8fd9\u662f\u5c0f\u7a0b\u5e8f\u5f00\u53d1\u4e2d\u7684\u4e00\u79cd\u5916\u90e8\u6837\u5f0f\u7c7b\uff0c\u8868\u793a\u8be5\u5143\u7d20\u5c06\u4f7f\u7528\u8be5\u6837\u5f0f\u7c7b\u5b9a\u4e49\u7684\u6837\u5f0f\u3002 BEM \u547d\u540d\u98ce\u683c\uff1a.t-grid&#8211;card \u91c7\u7528\u4e86 BEM \u547d\u540d\u98ce\u683c\uff0c\u5176\u4e2d: t-grid: \u8868\u793a\u5143\u7d20\u7684\u5757\uff08block\uff09\u540d\u79f0 &#8211;card: \u8868\u793a\u5143\u7d20\u7684\u5143\u7d20\uff08element\uff09\u540d\u79f0 \u5728\u5b9e\u9645\u9879\u76ee\u4e2d\u4f7f\u7528 BEM \u547d\u540d\u65f6\uff0c\u4e0d\u4e00\u5b9a\u9700\u8981\u4e25\u683c\u6309\u7167 DOM \u7ed3\u6784\u589e\u52a0\u540e\u7f00\u3002\u4e3a\u4e86\u7f29\u51cf class \u540d\u79f0\u957f\u5ea6\uff0c\u53ef\u4ee5\u6839\u636e\u56e2\u961f\u7684\u547d\u540d\u89c4\u8303\u8fdb\u884c\u5408\u7406\u8c03\u6574\u3002 CSS \u53d8\u91cf\uff1a&#8211;card \u90e8\u5206\u4e0d\u662f CSS \u53d8\u91cf\uff0cCSS \u53d8\u91cf\u662f\u4ee5 &#8212; \u5f00\u5934\u58f0\u660e\u5e76\u4e14\u901a\u8fc7 var() \u4f7f\u7528\u3002 \u4ee5\u4e0a\u5c31\u662f\u5c0f\u7a0b\u5e8f TDesign UI \u5e93\u4e2d [&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-3589","post","type-post","status-publish","format-standard","hentry","category-16"],"_links":{"self":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/3589","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=3589"}],"version-history":[{"count":0,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/3589\/revisions"}],"wp:attachment":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/media?parent=3589"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/categories?post=3589"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/tags?post=3589"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}