{"id":12366899,"date":"2026-03-14T00:21:46","date_gmt":"2026-03-13T16:21:46","guid":{"rendered":"https:\/\/www.likacloud.com\/knowledge\/%e5%85%a8%e9%9d%a2%e6%8e%8c%e6%8f%a1-tailwind-css-%e6%a0%b8%e5%bf%83%e6%a6%82%e5%bf%b5%e4%b8%8e%e5%ae%9e%e7%94%a8%e6%8a%80%e5%b7%a7\/"},"modified":"2026-03-14T00:23:07","modified_gmt":"2026-03-13T16:23:07","slug":"master-tailwind-css-core-concepts-practical-tips","status":"publish","type":"knowledge_post","link":"https:\/\/www.likacloud.com\/de\/knowledge\/website-building\/master-tailwind-css-core-concepts-practical-tips\/","title":{"rendered":"Die vollst\u00e4ndige Beherrschung der Kernkonzepte und praktischen Techniken von Tailwind CSS."},"content":{"rendered":"\n<h2 class=\"wp-block-heading\">\u4ec0\u4e48\u662f Tailwind CSS<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Tailwind CSS \u662f\u4e00\u4e2a\u529f\u80fd\u4f18\u5148\u7684 CSS \u6846\u67b6\uff0c\u5b83\u901a\u8fc7\u63d0\u4f9b\u4e00\u7cfb\u5217\u53ef\u7ec4\u5408\u7684\u539f\u5b50\u7c7b\u6765\u5feb\u901f\u6784\u5efa\u7528\u6237\u754c\u9762\u3002\u4e0e\u4f20\u7edf\u7684 Bootstrap \u7b49\u6846\u67b6\u4e0d\u540c\uff0c\u5b83\u4e0d\u63d0\u4f9b\u9884\u6784\u5efa\u7684\u7ec4\u4ef6\u6837\u5f0f\uff0c\u800c\u662f\u63d0\u4f9b\u4e00\u7cfb\u5217\u7ec6\u7c92\u5ea6\u7684\u5de5\u5177\u7c7b\uff08Utility Classes\uff09\uff0c\u6bd4\u5982 <code>.text-center<\/code>\u3001<code>.p-4<\/code>\u3001<code>.bg-blue-500<\/code>\uff0c\u5f00\u53d1\u8005\u901a\u8fc7\u5c06\u8fd9\u4e9b\u7c7b\u540d\u76f4\u63a5\u5199\u5728 HTML \u5143\u7d20\u4e0a\u6765\u5b9a\u4e49\u6837\u5f0f\u3002\u8fd9\u79cd\u201c\u5b9e\u7528\u81f3\u4e0a\u201d\u7684\u54f2\u5b66\u5e26\u6765\u4e86\u72ec\u7279\u7684\u5f00\u53d1\u8303\u5f0f\uff0c\u5373 CSS \u65e0\u9700\u79bb\u5f00 HTML \u6587\u4ef6\uff0c\u4ece\u800c\u6781\u5927\u5730\u63d0\u5347\u4e86\u539f\u578b\u8bbe\u8ba1\u548c\u5b9a\u5236\u5316\u5f00\u53d1\u7684\u6548\u7387\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u5b83\u7684\u6838\u5fc3\u5de5\u4f5c\u6d41\u7a0b\u662f\uff0c\u4f60\u901a\u8fc7\u5728 HTML \u4e2d\u7f16\u5199\u8fd9\u4e9b\u5b9e\u7528\u7c7b\u6765\u6784\u5efa\u8bbe\u8ba1\uff0c\u7136\u540e Tailwind \u7684\u6784\u5efa\u5de5\u5177\uff08\u5982 PostCSS\uff09\u4f1a\u626b\u63cf\u4f60\u7684\u6587\u4ef6\uff0c\u627e\u5230\u6240\u6709\u88ab\u4f7f\u7528\u7684\u7c7b\uff0c\u5e76\u6839\u636e\u4e00\u4e2a\u53ef\u914d\u7f6e\u7684\u8bbe\u8ba1\u7cfb\u7edf\uff08\u5982\u989c\u8272\u3001\u95f4\u8ddd\u3001\u5b57\u4f53\u5927\u5c0f\u7b49\uff09\uff0c\u751f\u6210\u4e00\u4e2a\u9ad8\u5ea6\u4f18\u5316\u4e14\u4ec5\u5305\u542b\u6240\u9700\u6837\u5f0f\u7684\u6700\u5c0f\u5316 CSS \u6587\u4ef6\u3002\u8fd9\u79cd\u6309\u9700\u751f\u6210\u7684\u65b9\u5f0f\u89e3\u51b3\u4e86\u4f20\u7edf CSS \u6846\u67b6\u81c3\u80bf\u7684\u95ee\u9898\u3002\u5b83\u4e0d\u662f\u4e00\u4e2a\u7ed9\u975e\u5f00\u53d1\u8005\u4f7f\u7528\u7684\u9884\u8bbe\u6837\u5f0f\u5e93\uff0c\u800c\u662f\u4e00\u4e2a\u4e13\u4e3a\u5f00\u53d1\u8005\u8bbe\u8ba1\u7684\u3001\u5f3a\u8c03\u63a7\u5236\u548c\u7075\u6d3b\u6027\u7684 CSS \u5de5\u5177\u96c6\u3002<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">\u6838\u5fc3\u6982\u5ff5\u4e0e\u57fa\u672c\u7528\u6cd5<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">\u8981\u6709\u6548\u4f7f\u7528 Tailwind CSS\uff0c\u5fc5\u987b\u7406\u89e3\u5176\u51e0\u4e2a\u6838\u5fc3\u6982\u5ff5\uff0c\u8fd9\u4e9b\u6982\u5ff5\u6784\u6210\u4e86\u5176\u5f3a\u5927\u529f\u80fd\u7684\u57fa\u7840\u3002<\/p>\n<!-- AUTO_INTERNAL_LINKS_START --><p>\u63a8\u8350\u9605\u8bfb <a href=\"https:\/\/www.likacloud.com\/ja\/knowledge\/website-building\/tailwind-css-beginners-guide-build-modern-responsive-websites\/\">Tailwind CSS \u5165\u95e8\u6307\u5357\uff1a\u4ece\u96f6\u5230\u4e00\u6784\u5efa\u73b0\u4ee3\u54cd\u5e94\u5f0f\u7f51\u9875<\/a>\u3002<\/p><!-- AUTO_INTERNAL_LINKS_END -->\n\n\n\n\n<h3 class=\"wp-block-heading\">\u5b9e\u7528\u7c7b\u547d\u540d\u4e0e\u8bbe\u8ba1\u7cfb\u7edf<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Tailwind \u7684\u5b9e\u7528\u7c7b\u547d\u540d\u9ad8\u5ea6\u89c4\u8303\u4e14\u8bed\u4e49\u5316\u3002\u6bcf\u4e2a\u7c7b\u540d\u901a\u5e38\u7531\u4e00\u4e2a\u5c5e\u6027\uff08\u5982 <code>m<\/code> \u4ee3\u8868 margin\uff0c<code>p<\/code> \u4ee3\u8868 padding\uff09\u548c\u4e00\u4e2a\u6570\u503c\u5c3a\u5ea6\u7ec4\u6210\u3002\u4f8b\u5982\uff0c<code>mt-2<\/code> \u8868\u793a <code>margin-top: 0.5rem<\/code>\u3002\u8fd9\u4e2a\u6570\u503c\u5c3a\u5ea6\u6765\u6e90\u4e8e\u5176\u914d\u7f6e\u6587\u4ef6\u4e2d\u5b9a\u4e49\u7684\u8bbe\u8ba1\u7cfb\u7edf\uff0c\u9ed8\u8ba4\u57fa\u4e8e\u4e00\u4e2a\u4ee5 <code>0.25rem<\/code> \u4e3a\u57fa\u51c6\u7684\u95f4\u8ddd\u6bd4\u4f8b\u3002\u8fd9\u5957\u7cfb\u7edf\u786e\u4fdd\u4e86\u6574\u4e2a\u9879\u76ee\u4e2d\u7684\u95f4\u8ddd\u3001\u989c\u8272\u3001\u5b57\u4f53\u5927\u5c0f\u7b49\u89c6\u89c9\u5c5e\u6027\u7684\u4e00\u81f4\u6027\u3002<\/p>\n<!-- AUTO_SYNCED_PATTERN_INSERT_START -->\n<div class=\"grid grid-cols-1 md:grid-cols-2 gap-4 md:gap-6 mb-8 md:mb-10 mt-10\"> \r\n\t<!-- \u91cd\u590d\u5668\u5faa\u73af\u5f00\u59cb -->\r\n\t\t\r\n\t<!-- \u5546\u5bb6\u5361\u7247 -->\r\n\t<div class=\"bg-white dark:bg-gray-750 rounded-lg overflow-hidden shadow-md flex gap-1 flex-col     justify-between\" data-link=\"https:\/\/www.likacloud.com\/de\/tolink\/wordpress-com-ai-website-builder\/\">\r\n\t\t<div class=\"flex items-start justify-between\"> \r\n\t\t\t<!-- \u5546\u5bb6logo -->\r\n\t\t\t<div class=\"w-16 h-16 bg-blue-200 dark:bg-blue-500\/30 flex items-center justify-center flex-shrink-0 p-3\">\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<img decoding=\"async\" src=\"https:\/\/www.likacloud.com\/wp-content\/uploads\/2026\/01\/20260107032104.svg\" alt=\"WordPress.com \u7f51\u7ad9\u5efa\u8bbe\u52a9\u624b\" class=\"w-12 object-contain !dark-filter08\" title=\"\">\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t<\/div>\r\n\t\t\t\r\n\t\t\t<!-- \u5546\u5bb6\u4fe1\u606f -->\r\n\t\t\t<div class=\"px-4 pt-2 flex-grow\">\r\n\t\t\t\t<div class=\"flex justify-between items-start mb-2\">\r\n\t\t\t\t\t<strong class=\"text-xl font-bold\">WordPress.com \u7f51\u7ad9\u5efa\u8bbe\u52a9\u624b<\/strong>\r\n\t\t\t\t\t\t\t\t\t<\/div>\r\n\t\t\t<\/div>\r\n\t\t<\/div>\r\n\t\t\t\t<span class=\"text-gray-500 dark:text-gray-300 !text-sm p-4 pb-0\">99.999% \u53ef\u7528\u6027+\u8de8\u533a\u5bb9\u707e\uff0c\u5168\u592924\u5c0f\u65f6\u652f\u6301\uff0c\u8d2d\u4e70\u535a\u5ba2\u5957\u9910\u514d\u8d39\u4f7f\u7528AI\u6784\u5efa\u7f51\u7ad9<\/span>\r\n\t\t\t\t<div class=\"flex flex-col gap-4 md:gap-6 justify-between p-4\"> \r\n\t\t\t<!-- \u6807\u7b7e -->\r\n\t\t\t\t\t\t\r\n\t\t\t<!-- \u6d3b\u52a8\u548c\u94fe\u63a5 --> \r\n\t\t\t<div class=\"flex justify-between items-center gap-3 flex-col\">\r\n\t\t\t\t\t\t\t\t<div class=\"text-gray-500 dark:text-gray-300 !text-sm line-clamp-1\">\u514d\u8d39\u57df\u540d\u4e00\u5e74<\/div>\r\n\t\t\t\t\t\t\t\t\t\t\t\t<a href=\"https:\/\/www.likacloud.com\/de\/tolink\/wordpress-com-ai-website-builder\/\" class=\"flex justify-end font-bold !text-lg !text-blue-600 dark:!text-blue-500\">\u8bbf\u95eeWordPress.com \u7f51\u7ad9\u5efa\u8bbe\u52a9\u624b \u2192<\/a>\r\n\t\t\t\t\t\t\t<\/div> \r\n\t\t<\/div>\r\n\t<\/div>\r\n\t\t\r\n\t<!-- \u5546\u5bb6\u5361\u7247 -->\r\n\t<div class=\"bg-white dark:bg-gray-750 rounded-lg overflow-hidden shadow-md flex gap-1 flex-col     justify-between\" data-link=\"https:\/\/www.likacloud.com\/de\/tolink\/ultahost-website-builder\/\">\r\n\t\t<div class=\"flex items-start justify-between\"> \r\n\t\t\t<!-- \u5546\u5bb6logo -->\r\n\t\t\t<div class=\"w-16 h-16 bg-blue-200 dark:bg-blue-500\/30 flex items-center justify-center flex-shrink-0 p-3\">\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<img decoding=\"async\" src=\"https:\/\/www.likacloud.com\/wp-content\/uploads\/2025\/12\/20251227023708.webp\" alt=\"UltaHost \u7f51\u7ad9\u5efa\u8bbe\u52a9\u624b\" class=\"w-12 object-contain !dark-filter08\" title=\"\">\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t<\/div>\r\n\t\t\t\r\n\t\t\t<!-- \u5546\u5bb6\u4fe1\u606f -->\r\n\t\t\t<div class=\"px-4 pt-2 flex-grow\">\r\n\t\t\t\t<div class=\"flex justify-between items-start mb-2\">\r\n\t\t\t\t\t<strong class=\"text-xl font-bold\">UltaHost \u7f51\u7ad9\u5efa\u8bbe\u52a9\u624b<\/strong>\r\n\t\t\t\t\t\t\t\t\t<\/div>\r\n\t\t\t<\/div>\r\n\t\t<\/div>\r\n\t\t\t\t<span class=\"text-gray-500 dark:text-gray-300 !text-sm p-4 pb-0\">900+\u514d\u8d39\u3001\u53ef\u5b9a\u5236\u7684\u6a21\u677f\uff0c\u83b7\u5f97\u4f18\u5316\u7f51\u7ad9\u641c\u7d22\u66dd\u5149\u6240\u9700\u7684 SEO \u80fd\u529b<\/span>\r\n\t\t\t\t<div class=\"flex flex-col gap-4 md:gap-6 justify-between p-4\"> \r\n\t\t\t<!-- \u6807\u7b7e -->\r\n\t\t\t\t\t\t\r\n\t\t\t<!-- \u6d3b\u52a8\u548c\u94fe\u63a5 --> \r\n\t\t\t<div class=\"flex justify-between items-center gap-3 flex-col\">\r\n\t\t\t\t\t\t\t\t<div class=\"text-gray-500 dark:text-gray-300 !text-sm line-clamp-1\">\u4f18\u60e0 40%<\/div>\r\n\t\t\t\t\t\t\t\t\t\t\t\t<a href=\"https:\/\/www.likacloud.com\/de\/tolink\/ultahost-website-builder\/\" class=\"flex justify-end font-bold !text-lg !text-blue-600 dark:!text-blue-500\">\u8bbf\u95eeUltaHost \u7f51\u7ad9\u5efa\u8bbe\u52a9\u624b \u2192<\/a>\r\n\t\t\t\t\t\t\t<\/div> \r\n\t\t<\/div>\r\n\t<\/div>\r\n\t\t<!-- \u91cd\u590d\u5668\u5faa\u73af\u7ed3\u675f -->\r\n<\/div>\r\n\r\n\r\n\n<!-- AUTO_SYNCED_PATTERN_INSERT_END -->\n\n\n\n\n\n<p class=\"wp-block-paragraph\">\u5728\u5b9e\u9645\u4f7f\u7528\u4e2d\uff0c\u4f60\u53ea\u9700\u5728 HTML \u5143\u7d20\u4e0a\u7ec4\u5408\u8fd9\u4e9b\u7c7b\u3002\u4f8b\u5982\uff0c\u521b\u5efa\u4e00\u4e2a\u5c45\u4e2d\u7684\u84dd\u8272\u6309\u94ae\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code class=\"language-html\">&lt;button class=&quot;px-4 py-2 bg-blue-600 text-white font-semibold rounded-lg shadow-md hover:bg-blue-700 focus:outline-none focus:ring-2 focus:ring-blue-400&quot;&gt;\n  \u70b9\u51fb\u6211\n&lt;\/button&gt;<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">\u8fd9\u884c\u4ee3\u7801\u901a\u8fc7\u7ec4\u5408 <code>.px-4<\/code>\uff08\u6c34\u5e73\u5185\u8fb9\u8ddd\uff09\u3001<code>.bg-blue-600<\/code>\uff08\u80cc\u666f\u8272\uff09\u3001<code>.rounded-lg<\/code>\uff08\u5927\u5706\u89d2\uff09\u7b49\u7c7b\uff0c\u5feb\u901f\u5b9a\u4e49\u4e86\u4e00\u4e2a\u5b8c\u6574\u7684\u6309\u94ae\u6837\u5f0f\uff0c\u5176\u4e2d\u8fd8\u5305\u542b\u4e86\u60ac\u505c\u548c\u7126\u70b9\u72b6\u6001\u7684\u6837\u5f0f\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">\u54cd\u5e94\u5f0f\u8bbe\u8ba1\u4e0e\u65ad\u70b9<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Tailwind \u5185\u7f6e\u4e86\u79fb\u52a8\u4f18\u5148\u7684\u54cd\u5e94\u5f0f\u8bbe\u8ba1\u7cfb\u7edf\u3002\u901a\u8fc7\u5728\u7c7b\u540d\u524d\u6dfb\u52a0\u65ad\u70b9\u524d\u7f00\uff0c\u53ef\u4ee5\u8f7b\u677e\u5730\u5728\u4e0d\u540c\u5c4f\u5e55\u5c3a\u5bf8\u4e0b\u5e94\u7528\u4e0d\u540c\u7684\u6837\u5f0f\u3002\u9ed8\u8ba4\u7684\u65ad\u70b9\u5305\u62ec <code>sm:<\/code>\u3001<code>md:<\/code>\u3001<code>lg:<\/code>\u3001<code>xl:<\/code>\u3001<code>2xl:<\/code>\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u4f8b\u5982\uff0c\u4e00\u4e2a\u5143\u7d20\u5728\u79fb\u52a8\u7aef\u4e3a\u5757\u7ea7\u663e\u793a\uff0c\u5728\u4e2d\u7b49\u5c4f\u5e55\u4e0a\u53d8\u4e3a\u5f39\u6027\u5e03\u5c40\uff1a<\/p>\n<!-- AUTO_INTERNAL_LINKS_START --><p>\u63a8\u8350\u9605\u8bfb <a href=\"https:\/\/www.likacloud.com\/ja\/knowledge\/website-building\/tailwind-css-comprehensive-guide-from-beginner-to-expert\/\">\u6df1\u5165\u7406\u89e3 Tailwind CSS\uff1a\u4ece\u5165\u95e8\u5230\u7cbe\u901a\u7684\u5b9e\u7528\u6307\u5357<\/a>\u3002<\/p><!-- AUTO_INTERNAL_LINKS_END -->\n\n\n\n\n<pre class=\"wp-block-code\"><code class=\"language-html\">&lt;div class=&quot;block md:flex&quot;&gt;\n  &lt;!-- \u5185\u5bb9 --&gt;\n&lt;\/div&gt;<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">\u8fd9\u8868\u793a\u8be5 <code>div<\/code> \u9ed8\u8ba4\u662f <code>display: block<\/code>\uff0c\u4f46\u5728 <code>md<\/code>\uff08768px\uff09\u53ca\u4ee5\u4e0a\u7684\u5c4f\u5e55\u5bbd\u5ea6\u65f6\uff0c\u53d8\u4e3a <code>display: flex<\/code>\u3002\u8fd9\u79cd\u5199\u6cd5\u5c06\u54cd\u5e94\u5f0f\u903b\u8f91\u5185\u8054\u5728 HTML \u4e2d\uff0c\u4f7f\u5f97\u754c\u9762\u5728\u4e0d\u540c\u8bbe\u5907\u4e0a\u7684\u8868\u73b0\u4e00\u76ee\u4e86\u7136\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">\u72b6\u6001\u53d8\u4f53\u4e0e\u4f2a\u7c7b<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Tailwind \u652f\u6301\u4f7f\u7528\u524d\u7f00\u4e3a\u5143\u7d20\u7684\u5404\u79cd\u72b6\u6001\u6dfb\u52a0\u6837\u5f0f\uff0c\u8fd9\u6781\u5927\u5730\u7b80\u5316\u4e86\u4ea4\u4e92\u6837\u5f0f\u7684\u7f16\u5199\u3002\u5e38\u89c1\u7684\u72b6\u6001\u524d\u7f00\u5305\u62ec <code>hover:<\/code>\u3001<code>focus:<\/code>\u3001<code>active:<\/code>\u3001<code>disabled:<\/code> \u7b49\uff0c\u4ee5\u53ca\u7528\u4e8e\u5a92\u4f53\u67e5\u8be2\u7684 <code>dark:<\/code>\uff08\u6697\u9ed1\u6a21\u5f0f\uff09\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u4ee5\u4e0b\u662f\u4e00\u4e2a\u5177\u6709\u60ac\u505c\u548c\u7126\u70b9\u6548\u679c\u7684\u8f93\u5165\u6846\u793a\u4f8b\uff1a<\/p>\n<!-- AUTO_SYNCED_PATTERN_INSERT_START -->\n\n  <div class=\"flex justify-between items-center flex-col lg:flex-row xl:flex-col 2xl:flex-row gap-6 sm:gap-8 rounded-lg border border-gray-200 dark:border-gray-700 p-4 mb-8 lg:mb-10 sm:p-6 bg-white dark:bg-gray-750 shadow-md transition-colors duration-300\"\n         data-link=\"https:\/\/www.likacloud.com\/de\/tolink\/bluehost-wordpress-hosting\/\">\n\n      <div class=\"flex flex-col gap-3 gap-4 sm:gap-6 w-full\">\n        <strong class=\"text-2xl font-semibold text-gray-900 dark:text-gray-200\">Bluehost\u5efa\u7ad9\u52a9\u624b<\/strong>\n        <div class=\"text-gray-600 dark:text-gray-300 word-word\">\u63d0\u4f9b AI \u7f51\u7ad9\u521b\u5efa\u5de5\u5177\uff0c24\/7 \u5728\u7ebf\u804a\u5929\u4e0e\u7535\u8bdd\u652f\u6301\uff0c\u4e00\u5e74\u514d\u8d39\u57df\u540d\uff0c\u514d\u8d39CDN\uff0c99.99% \u6b63\u5e38\u8fd0\u884c\u65f6\u95f4 SLA<\/div>\n      <\/div>\n\n      <div class=\"flex items-center flex-col md:flex-row lg:flex-col xl:flex-row 2xl:flex-col gap-6 shrink-0\">\n                  <a href=\"https:\/\/www.likacloud.com\/de\/tolink\/bluehost-wordpress-hosting\/\">\n                          <!-- \u53ea\u6709\u4e00\u4e2a\u53ef\u7528 icon\uff08\u6216\u591c\u95f4\u56de\u9000\uff09\uff0c\u4e24\u79cd\u6a21\u5f0f\u5171\u7528 -->\n              <img decoding=\"async\" src=\"https:\/\/www.likacloud.com\/wp-content\/uploads\/2025\/12\/20251231095441.svg\" alt=\"\u5efa\u7ad9\u52a9\u624b LOGO\" class=\"content-promotion-card-icon h-9 min-h-9\" title=\"\">\n                      <\/a>\n          \n        <a href=\"https:\/\/www.likacloud.com\/de\/tolink\/bluehost-wordpress-hosting\/\"\n           class=\"bg-blue-500 w-full md:w-auto lg:w-full xl:w-auto 2xl:w-full text-center !text-white dark:!text-gray-200 !px-5 !py-1.5 rounded-full hover:bg-blue-600 transition-colors\">\n          \u8bbf\u95eeBluehost        <\/a>\n      <\/div>\n    <\/div>\n\n    \n<!-- AUTO_SYNCED_PATTERN_INSERT_END -->\n\n\n\n\n\n<pre class=\"wp-block-code\"><code class=\"language-html\">&lt;input class=&quot;border border-gray-300 rounded p-2 focus:border-blue-500 focus:ring-1 focus:ring-blue-500 hover:border-gray-400&quot; type=&quot;text&quot;&gt;<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">\u8fd9\u91cc\uff0c<code>.focus:border-blue-500<\/code> \u548c <code>.focus:ring-1<\/code> \u7c7b\u5b9a\u4e49\u4e86\u8f93\u5165\u6846\u83b7\u5f97\u7126\u70b9\u65f6\u7684\u8fb9\u6846\u548c\u8f6e\u5ed3\u73af\u6837\u5f0f\uff0c\u800c <code>.hover:border-gray-400<\/code> \u5b9a\u4e49\u4e86\u9f20\u6807\u60ac\u505c\u65f6\u7684\u8fb9\u6846\u53d8\u5316\u3002<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">\u9ad8\u7ea7\u529f\u80fd\u4e0e\u81ea\u5b9a\u4e49\u914d\u7f6e<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Tailwind CSS \u7684\u5f3a\u5927\u4e4b\u5904\u5728\u4e8e\u5176\u9ad8\u5ea6\u7684\u53ef\u5b9a\u5236\u6027\u3002\u901a\u8fc7\u4fee\u6539\u5176\u6838\u5fc3\u914d\u7f6e\u6587\u4ef6 <code>tailwind.config.js<\/code>\uff0c\u4f60\u53ef\u4ee5\u5b8c\u5168\u63a7\u5236\u9879\u76ee\u7684\u8bbe\u8ba1\u7cfb\u7edf\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">\u81ea\u5b9a\u4e49\u4e3b\u9898\u4e0e\u6269\u5c55<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">\u5728 <code>tailwind.config.js<\/code> \u4e2d\uff0c\u4f60\u53ef\u4ee5\u6269\u5c55\u6216\u8986\u76d6\u9ed8\u8ba4\u7684\u4e3b\u9898\u8bbe\u7f6e\u3002\u4f8b\u5982\uff0c\u53ef\u4ee5\u6dfb\u52a0\u81ea\u5b9a\u4e49\u989c\u8272\u3001\u5b57\u4f53\u3001\u95f4\u8ddd\u503c\u6216\u6dfb\u52a0\u65b0\u7684\u9634\u5f71\u6837\u5f0f\u3002<\/p>\n<!-- AUTO_INTERNAL_LINKS_START --><p>\u63a8\u8350\u9605\u8bfb <a href=\"https:\/\/www.likacloud.com\/ja\/knowledge\/website-building\/tailwind-css-beginners-guide-build-modern-responsive-interfaces-2026\/\">**Tailwind CSS \u5165\u95e8\u6307\u5357\uff1a\u4ece\u96f6\u5f00\u59cb\u6784\u5efa\u73b0\u4ee3\u5316\u54cd\u5e94\u5f0f\u754c\u9762**<\/a>\u3002<\/p><!-- AUTO_INTERNAL_LINKS_END -->\n\n\n\n\n<pre class=\"wp-block-code\"><code class=\"language-javascript\">\/\/ tailwind.config.js\nmodule.exports = {\n  theme: {\n    extend: {\n      colors: {\n        &#039;brand-primary&#039;: &#039;#1d4ed8&#039;,\n        &#039;brand-secondary&#039;: &#039;#7c3aed&#039;,\n      },\n      spacing: {\n        &#039;128&#039;: &#039;32rem&#039;,\n      },\n      fontFamily: {\n        &#039;custom&#039;: [&#039;&quot;Custom Font&quot;&#039;, &#039;sans-serif&#039;],\n      }\n    },\n  },\n}<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">\u901a\u8fc7 <code>extend<\/code> \u5bf9\u8c61\uff0c\u6211\u4eec\u6dfb\u52a0\u4e86\u65b0\u7684\u989c\u8272 <code>brand-primary<\/code>\uff0c\u65b0\u7684\u95f4\u8ddd\u5c3a\u5bf8 <code>128<\/code> \u4ee5\u53ca\u65b0\u7684\u5b57\u4f53\u65cf <code>custom<\/code>\u3002\u4e4b\u540e\uff0c\u4f60\u5c31\u53ef\u4ee5\u5728 HTML \u4e2d\u4f7f\u7528 <code>.bg-brand-primary<\/code>\u3001<code>.h-128<\/code> \u548c <code>.font-custom<\/code> \u7b49\u7c7b\u4e86\u3002\u5982\u679c\u60f3\u5b8c\u5168\u8986\u76d6\u67d0\u4e2a\u9ed8\u8ba4\u5c5e\u6027\uff08\u5982\u8c03\u8272\u76d8\uff09\uff0c\u5219\u5e94\u76f4\u63a5\u5728 <code>theme<\/code> \u5bf9\u8c61\u4e0b\u5b9a\u4e49\uff0c\u800c\u975e <code>extend<\/code>\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">\u4f7f\u7528 @apply \u63d0\u53d6\u7ec4\u4ef6<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">\u867d\u7136\u76f4\u63a5\u5728 HTML \u4e2d\u7ec4\u5408\u5b9e\u7528\u7c7b\u662f\u63a8\u8350\u505a\u6cd5\uff0c\u4f46\u5f53\u67d0\u4e9b\u7c7b\u7ec4\u5408\u9891\u7e41\u51fa\u73b0\u65f6\uff08\u4f8b\u5982\u4e00\u4e2a\u6309\u94ae\u7684\u57fa\u7840\u6837\u5f0f\uff09\uff0c\u91cd\u590d\u7f16\u5199\u4f1a\u663e\u5f97\u5197\u957f\u3002\u8fd9\u65f6\u53ef\u4ee5\u4f7f\u7528 <code>@apply<\/code> \u6307\u4ee4\u5728 CSS \u6587\u4ef6\u4e2d\u63d0\u53d6\u516c\u5171\u6837\u5f0f\uff0c\u521b\u5efa\u81ea\u5b9a\u4e49\u7684\u7ec4\u4ef6\u7c7b\u3002<\/p>\n<!-- AUTO_SYNCED_PATTERN_INSERT_START -->\n\n  <div class=\"flex justify-between items-center flex-col lg:flex-row xl:flex-col 2xl:flex-row gap-6 sm:gap-8 rounded-lg border border-gray-200 dark:border-gray-700 p-4 mb-8 lg:mb-10 sm:p-6 bg-white dark:bg-gray-750 shadow-md transition-colors duration-300\"\n         data-link=\"https:\/\/www.likacloud.com\/de\/tolink\/hosting-com-sitebuilder\/\">\n\n      <div class=\"flex flex-col gap-3 gap-4 sm:gap-6 w-full\">\n        <strong class=\"text-2xl font-semibold text-gray-900 dark:text-gray-200\">hosting.com<\/strong>\n        <div class=\"text-gray-600 dark:text-gray-300 word-word\">\u514d\u8d39SSL\u3001Cloudflare CDN\u3001WAF\uff0c40+\u5168\u7403\u673a\u623f\u53ef\u9009\uff0c\u5c31\u8fd1\u66f4\u4f4e\u5ef6\u8fdf\uff0c 24\/7\/365 \u670d\u52a1\u652f\u6301\uff0c\u73b0\u5728\u53ef\u4ee5\u7701\u4e0b\u9ad8\u8fbe 67%\u7684\u8d39\u7528\uff0c\u652f\u6301 AI \u6784\u5efa\u548c SEO \u4f18\u5316<\/div>\n      <\/div>\n\n      <div class=\"flex items-center flex-col md:flex-row lg:flex-col xl:flex-row 2xl:flex-col gap-6 shrink-0\">\n                  <a href=\"https:\/\/www.likacloud.com\/de\/tolink\/hosting-com-sitebuilder\/\">\n                          <!-- \u767d\u5929 -->\n              <img decoding=\"async\" src=\"https:\/\/www.likacloud.com\/wp-content\/uploads\/2025\/09\/20250901222940.svg\" alt=\" LOGO\" class=\"content-promotion-card-icon h-9 min-h-9 dark:hidden\" title=\"\">\n              <!-- \u591c\u95f4 -->\n              <img decoding=\"async\" src=\"https:\/\/www.likacloud.com\/wp-content\/uploads\/2025\/12\/20251228220957.webp\" alt=\" LOGO\" class=\"content-promotion-card-icon h-9 min-h-9 hidden dark:block\" title=\"\">\n                      <\/a>\n          \n        <a href=\"https:\/\/www.likacloud.com\/de\/tolink\/hosting-com-sitebuilder\/\"\n           class=\"bg-blue-500 w-full md:w-auto lg:w-full xl:w-auto 2xl:w-full text-center !text-white dark:!text-gray-200 !px-5 !py-1.5 rounded-full hover:bg-blue-600 transition-colors\">\n          \u8bbf\u95eehosting.com        <\/a>\n      <\/div>\n    <\/div>\n\n    \n<!-- AUTO_SYNCED_PATTERN_INSERT_END -->\n\n\n\n\n\n<pre class=\"wp-block-code\"><code class=\"language-css\">\/* \u5728\u4f60\u7684 CSS \u6587\u4ef6\u4e2d *\/\n.btn-primary {\n  @apply px-4 py-2 bg-blue-600 text-white font-semibold rounded-lg shadow-md hover:bg-blue-700 focus:outline-none focus:ring-2 focus:ring-blue-400;\n}<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">\u7136\u540e\uff0c\u5728 HTML \u4e2d\u53ea\u9700\u4f7f\u7528\u8fd9\u4e2a\u81ea\u5b9a\u4e49\u7c7b\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code class=\"language-html\">&lt;button class=&quot;btn-primary&quot;&gt;\n  \u70b9\u51fb\u6211\n&lt;\/button&gt;<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">\u9700\u8981\u6ce8\u610f\u7684\u662f\uff0c\u8fc7\u5ea6\u4f7f\u7528 <code>@apply<\/code> \u4f1a\u504f\u79bb Tailwind \u201c\u529f\u80fd\u6027\u4f18\u5148\u201d\u7684\u7406\u5ff5\uff0c\u5b83\u6700\u9002\u5408\u7528\u4e8e\u90a3\u4e9b\u786e\u8ba4\u4e3a\u91cd\u590d\u4e14\u7a33\u5b9a\u7684\u6837\u5f0f\u6a21\u5757\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">\u6697\u9ed1\u6a21\u5f0f\u7684\u5b9e\u73b0<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Tailwind \u7b2c\u4e8c\u7248\u4e4b\u540e\u539f\u751f\u652f\u6301\u6697\u9ed1\u6a21\u5f0f\u3002\u9996\u5148\uff0c\u5728 <code>tailwind.config.js<\/code> \u4e2d\u542f\u7528\u57fa\u4e8e\u7c7b\u6216\u5a92\u4f53\u7684\u7b56\u7565\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code class=\"language-javascript\">module.exports = {\n  darkMode: &#039;class&#039;, \/\/ \u6216 &#039;media&#039;\n  \/\/ ...\n}<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">\u5982\u679c\u9009\u62e9 <code>'class'<\/code> \u7b56\u7565\uff0c\u4f60\u9700\u8981\u5728 HTML \u6839\u5143\u7d20\uff08\u5982 <code><\/code> \u6216 <code><\/code>\uff09\u4e0a\u52a8\u6001\u6dfb\u52a0\u6216\u79fb\u9664 <code>dark<\/code> \u7c7b\uff08\u901a\u5e38\u901a\u8fc7 JavaScript \u5b9e\u73b0\uff09\u3002\u5982\u679c\u9009\u62e9 <code>'media'<\/code>\uff0c\u5219\u6697\u9ed1\u6a21\u5f0f\u5c06\u9075\u5faa\u7528\u6237\u64cd\u4f5c\u7cfb\u7edf\u7684\u4e3b\u9898\u504f\u597d\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u542f\u7528\u540e\uff0c\u4f60\u53ef\u4ee5\u5728\u4efb\u4f55\u5b9e\u7528\u7c7b\u524d\u4f7f\u7528 <code>dark:<\/code> \u524d\u7f00\u6765\u5b9a\u4e49\u6697\u8272\u4e3b\u9898\u4e0b\u7684\u6837\u5f0f\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code class=\"language-html\">&lt;div class=&quot;bg-white dark:bg-gray-800 text-gray-900 dark:text-gray-100&quot;&gt;\n  &lt;p&gt;\u8fd9\u6bb5\u6587\u5b57\u5728\u4eae\u8272\u548c\u6697\u8272\u4e3b\u9898\u4e0b\u4f1a\u6709\u4e0d\u540c\u7684\u80cc\u666f\u548c\u524d\u666f\u8272\u3002&lt;\/p&gt;\n&lt;\/div&gt;<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">\u6027\u80fd\u4f18\u5316\u4e0e\u751f\u4ea7\u90e8\u7f72<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">\u5728\u751f\u4ea7\u73af\u5883\u4e2d\uff0c\u4f18\u5316 CSS \u6587\u4ef6\u4f53\u79ef\u81f3\u5173\u91cd\u8981\u3002Tailwind \u4ece\u4e00\u5f00\u59cb\u5c31\u4e3a\u6b64\u8bbe\u8ba1\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">\u6447\u6811\u4f18\u5316<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Tailwind CSS \u901a\u8fc7 PostCSS \u7684 <code>@tailwind<\/code> \u6307\u4ee4\u548c PurgeCSS\uff08\u5728 Tailwind CSS v3 \u4e2d\u5df2\u96c6\u6210\u4e3a\u5185\u90e8\u5f15\u64ce\uff09\u6765\u5b9e\u73b0\u6447\u6811\u4f18\u5316\u3002\u5728\u6784\u5efa\u751f\u4ea7\u7248\u672c\u65f6\uff0c\u5b83\u4f1a\u626b\u63cf\u4f60\u7684\u9879\u76ee\u6587\u4ef6\uff08\u901a\u5e38\u662f HTML\u3001JavaScript\/JSX\u3001Vue\u3001Twig \u7b49\uff09\uff0c\u627e\u51fa\u6240\u6709\u4f7f\u7528\u5230\u7684 Tailwind \u7c7b\u540d\uff0c\u7136\u540e\u53ea\u5c06\u8fd9\u4e9b\u7c7b\u5bf9\u5e94\u7684 CSS \u89c4\u5219\u6253\u5305\u5230\u6700\u7ec8\u7684\u6837\u5f0f\u8868\u4e2d\u3002\u672a\u4f7f\u7528\u7684\u7c7b\u5c06\u88ab\u81ea\u52a8\u5254\u9664\uff0c\u8fd9\u80fd\u786e\u4fdd\u6700\u7ec8\u751f\u6210\u7684 CSS \u6587\u4ef6\u975e\u5e38\u5c0f\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u914d\u7f6e\u901a\u5e38\u5728 <code>tailwind.config.js<\/code> \u7684 <code>content<\/code> \u5b57\u6bb5\u4e2d\u6307\u5b9a\u9700\u8981\u626b\u63cf\u7684\u6587\u4ef6\u8def\u5f84\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code class=\"language-javascript\">module.exports = {\n  content: [\n    &#039;.\/src\/**\/*.{html,js,jsx,ts,tsx,vue}&#039;,\n  ],\n  \/\/ ...\n}<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">\u8bf7\u786e\u4fdd\u6b64\u914d\u7f6e\u51c6\u786e\u8986\u76d6\u4e86\u6240\u6709\u4f7f\u7528 Tailwind \u7c7b\u540d\u7684\u6587\u4ef6\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">\u4f7f\u7528 JIT \u6a21\u5f0f<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">\u4ece Tailwind CSS v3.0 \u5f00\u59cb\uff0c\u5373\u65f6\uff08Just-in-Time\uff0cJIT\uff09\u5f15\u64ce\u5df2\u6210\u4e3a\u9ed8\u8ba4\u4e14\u552f\u4e00\u6a21\u5f0f\u3002\u5728 JIT \u6a21\u5f0f\u4e0b\uff0cTailwind \u4e0d\u4f1a\u9884\u5148\u751f\u6210\u6240\u6709\u53ef\u80fd\u7684\u7c7b\uff0c\u800c\u662f\u5728\u5f00\u53d1\u8fc7\u7a0b\u4e2d\uff0c\u6839\u636e\u4f60\u5728\u4ee3\u7801\u4e2d\u5b9e\u9645\u4f7f\u7528\u7684\u7c7b\u540d\uff0c\u5b9e\u65f6\u751f\u6210\u5bf9\u5e94\u7684 CSS\u3002\u8fd9\u5e26\u6765\u4e86\u51e0\u4e2a\u5de8\u5927\u4f18\u52bf\uff1a\u5f00\u53d1\u73af\u5883\u4e0b\u7684\u6784\u5efa\u901f\u5ea6\u6781\u5feb\u3001\u652f\u6301\u4efb\u610f\u503c\uff08\u5982 <code>p-[13px]<\/code>\uff09\u3001\u652f\u6301\u66f4\u590d\u6742\u7684\u72b6\u6001\u7ec4\u5408\uff08\u5982 <code>md:dark:hover:bg-blue-500<\/code>\uff09\uff0c\u5e76\u4e14\u6700\u7ec8\u7684\u751f\u4ea7\u5305\u5927\u5c0f\u4e0e\u4e4b\u524d PurgeCSS \u4f18\u5316\u7684\u7ed3\u679c\u76f8\u5f53\u751a\u81f3\u66f4\u5c0f\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u4f60\u65e0\u9700\u8fdb\u884c\u989d\u5916\u914d\u7f6e\u5373\u53ef\u4eab\u53d7 JIT \u6a21\u5f0f\u7684\u6240\u6709\u597d\u5904\u3002\u8fd9\u610f\u5473\u7740\u4f60\u53ef\u4ee5\u76f4\u63a5\u4f7f\u7528\u50cf <code>top-[-10px]<\/code> \u6216 <code>bg-[#1da1f2]<\/code> \u8fd9\u6837\u7684\u4efb\u610f\u503c\u7c7b\uff0c\u800c\u65e0\u9700\u9884\u5148\u5728\u914d\u7f6e\u4e2d\u5b9a\u4e49\u3002<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">\u603b\u7ed3<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Tailwind CSS \u901a\u8fc7\u5176\u529f\u80fd\u4f18\u5148\u7684\u5b9e\u7528\u7c7b\u8303\u5f0f\uff0c\u5f7b\u5e95\u6539\u53d8\u4e86\u524d\u7aef\u5f00\u53d1\u8005\u7f16\u5199\u6837\u5f0f\u7684\u65b9\u5f0f\u3002\u5b83\u5f3a\u8c03\u76f4\u63a5\u5728\u6807\u8bb0\u8bed\u8a00\u4e2d\u901a\u8fc7\u7ec4\u5408\u539f\u5b50\u7c7b\u6765\u6784\u5efa\u754c\u9762\uff0c\u4ece\u800c\u5b9e\u73b0\u4e86\u6781\u9ad8\u7684\u5f00\u53d1\u6548\u7387\u548c\u5b9a\u5236\u7075\u6d3b\u6027\u3002\u5176\u5185\u7f6e\u7684\u54cd\u5e94\u5f0f\u7cfb\u7edf\u3001\u72b6\u6001\u53d8\u4f53\u4ee5\u53ca\u6697\u9ed1\u6a21\u5f0f\u652f\u6301\uff0c\u4f7f\u5f97\u590d\u6742\u7684\u4ea4\u4e92\u548c\u81ea\u9002\u5e94\u8bbe\u8ba1\u53d8\u5f97\u5f02\u5e38\u7b80\u5355\u3002\u901a\u8fc7\u6df1\u5ea6\u53ef\u5b9a\u5236\u7684\u914d\u7f6e\u6587\u4ef6\uff0c\u5f00\u53d1\u8005\u53ef\u4ee5\u8f7b\u677e\u6253\u9020\u7b26\u5408\u54c1\u724c\u89c4\u8303\u7684\u8bbe\u8ba1\u7cfb\u7edf\u3002\u66f4\u91cd\u8981\u7684\u662f\uff0c\u5176\u57fa\u4e8e JIT \u7684\u6784\u5efa\u6d41\u7a0b\u548c\u5f3a\u5927\u7684\u6447\u6811\u4f18\u5316\u80fd\u529b\uff0c\u786e\u4fdd\u4e86\u4ece\u5f00\u53d1\u5230\u751f\u4ea7\u90fd\u80fd\u83b7\u5f97\u5353\u8d8a\u7684\u6027\u80fd\u4f53\u9a8c\u3002\u638c\u63e1 Tailwind CSS\uff0c\u610f\u5473\u7740\u638c\u63e1\u4e86\u4e00\u5957\u7528\u4e8e\u6784\u5efa\u73b0\u4ee3\u3001\u9ad8\u6548\u3001\u53ef\u7ef4\u62a4\u7528\u6237\u754c\u9762\u7684\u5f3a\u5927\u5de5\u5177\u96c6\u3002<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">FAQ \u5e38\u89c1\u95ee\u9898<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\">Tailwind CSS \u4e0e Bootstrap \u7684\u4e3b\u8981\u533a\u522b\u662f\u4ec0\u4e48<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">\u4e24\u8005\u7684\u6838\u5fc3\u7406\u5ff5\u622a\u7136\u4e0d\u540c\u3002Bootstrap \u662f\u4e00\u4e2a\u7ec4\u4ef6\u6846\u67b6\uff0c\u63d0\u4f9b\u9884\u5236\u7684\u3001\u6837\u5f0f\u5b8c\u6574\u7684\u7ec4\u4ef6\uff08\u5982\u5bfc\u822a\u680f\u3001\u5361\u7247\u3001\u6a21\u6001\u6846\uff09\uff0c\u5f00\u53d1\u8005\u4e3b\u8981\u8fdb\u884c\u7ec4\u88c5\u548c\u6709\u9650\u7684\u5b9a\u5236\u3002\u800c Tailwind CSS \u662f\u4e00\u4e2a\u5b9e\u7528\u7c7b\u6846\u67b6\uff0c\u4e0d\u63d0\u4f9b\u4efb\u4f55\u9884\u6210\u578b\u7ec4\u4ef6\uff0c\u53ea\u63d0\u4f9b\u6784\u5efa\u7ec4\u4ef6\u6240\u9700\u7684\u6700\u57fa\u7840\u7684\u6837\u5f0f\u5de5\u5177\u7c7b\uff0c\u5f00\u53d1\u8005\u62e5\u6709\u5b8c\u5168\u7684\u63a7\u5236\u6743\uff0c\u53ef\u4ee5\u5b9e\u73b0\u4efb\u4f55\u81ea\u5b9a\u4e49\u8bbe\u8ba1\uff0c\u4f46\u9700\u8981\u81ea\u5df1\u4ece\u96f6\u5f00\u59cb\u201c\u7ec4\u88c5\u201d\u7ec4\u4ef6\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">\u5728\u5927\u578b\u9879\u76ee\u4e2d\uff0cHTML \u4e2d\u7c7b\u540d\u8fc7\u957f\u662f\u5426\u96be\u4ee5\u7ef4\u62a4<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">\u8fd9\u662f\u4e00\u4e2a\u5e38\u89c1\u7684\u62c5\u5fe7\u3002\u5b9e\u8df5\u8868\u660e\uff0c\u901a\u8fc7\u5408\u7406\u4f7f\u7528\u7ec4\u4ef6\u5316\u601d\u60f3\uff0c\u8fd9\u4e2a\u95ee\u9898\u53ef\u4ee5\u5f97\u5230\u6709\u6548\u7ba1\u7406\u3002\u5728 Vue\u3001React \u7b49\u7ec4\u4ef6\u5316\u6846\u67b6\u4e2d\uff0c\u4f60\u53ef\u4ee5\u5c06\u6837\u5f0f\u7ec4\u5408\u5c01\u88c5\u5728\u53ef\u590d\u7528\u7684\u7ec4\u4ef6\u91cc\u3002\u6b64\u5916\uff0c\u9002\u5ea6\u4f7f\u7528 <code>@apply<\/code> \u6307\u4ee4\u63d0\u53d6\u91cd\u590d\u7684\u6837\u5f0f\u6a21\u5f0f\u4e5f\u662f\u5f88\u597d\u7684\u505a\u6cd5\u3002\u5173\u952e\u5728\u4e8e\u4fdd\u6301\u7ec4\u4ef6\u7684\u5355\u4e00\u804c\u8d23\u548c\u5408\u7406\u7c92\u5ea6\uff0c\u8fd9\u6837\u5373\u4f7f\u7ec4\u4ef6\u5185\u90e8\u7684 HTML \u7c7b\u540d\u8f83\u957f\uff0c\u7531\u4e8e\u903b\u8f91\u88ab\u5c01\u88c5\uff0c\u6574\u4f53\u9879\u76ee\u7684\u53ef\u7ef4\u62a4\u6027\u4f9d\u7136\u5f88\u9ad8\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">\u5982\u4f55\u4e0e\u56e2\u961f\u8bbe\u8ba1\u5e08\u534f\u4f5c\u4ee5\u4fdd\u6301\u8bbe\u8ba1\u4e00\u81f4\u6027<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Tailwind CSS \u914d\u7f6e\u6587\u4ef6 <code>tailwind.config.js<\/code> \u662f\u5b9e\u73b0\u8bbe\u8ba1\u4e00\u81f4\u6027\u534f\u4f5c\u7684\u7edd\u4f73\u6865\u6881\u3002\u56e2\u961f\u8bbe\u8ba1\u5e08\u53ef\u4ee5\u4e0e\u5f00\u53d1\u8005\u5171\u540c\u5b9a\u4e49\u914d\u7f6e\u6587\u4ef6\u4e2d\u7684\u8bbe\u8ba1\u4ee4\u724c\uff08Design Tokens\uff09\uff0c\u5982\u989c\u8272\u8c03\u8272\u677f\u3001\u95f4\u8ddd\u6bd4\u4f8b\u3001\u5b57\u4f53\u5927\u5c0f\u3001\u9634\u5f71\u3001\u5706\u89d2\u7b49\u3002\u4e00\u65e6\u8fd9\u4e2a\u201c\u8bbe\u8ba1\u7cfb\u7edf\u201d\u5728\u914d\u7f6e\u6587\u4ef6\u4e2d\u786e\u7acb\uff0c\u5f00\u53d1\u8005\u5728\u7f16\u7801\u65f6\u5c31\u53ea\u80fd\u4f7f\u7528\u8fd9\u4e9b\u9884\u5b9a\u4e49\u7684\u9009\u9879\uff08\u5982\u4f7f\u7528 <code>.p-4<\/code> \u800c\u4e0d\u662f\u4efb\u610f\u50cf\u7d20\u503c\uff09\uff0c\u8bbe\u8ba1\u5e08\u4e5f\u53ef\u4ee5\u901a\u8fc7\u67e5\u770b\u914d\u7f6e\u6587\u4ef6\u6765\u4e86\u89e3\u6574\u4e2a\u7cfb\u7edf\u7684\u89c6\u89c9\u89c4\u8303\uff0c\u4ece\u800c\u5b9e\u73b0\u8bbe\u8ba1\u4e0e\u4ee3\u7801\u7684\u9ad8\u5ea6\u7edf\u4e00\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Tailwind CSS \u751f\u6210\u7684 CSS \u6587\u4ef6\u5728\u6700\u7ec8\u6253\u5305\u540e\u4f53\u79ef\u4f1a\u5f88\u5927\u5417<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">\u4e0d\u4f1a\uff0c\u8fd9\u6b63\u662f Tailwind CSS \u7684\u6838\u5fc3\u4f18\u52bf\u4e4b\u4e00\u3002\u5728\u751f\u4ea7\u6784\u5efa\u9636\u6bb5\uff0cTailwind \u4f1a\u901a\u8fc7\u5176\u5185\u7f6e\u7684\u6447\u6811\u4f18\u5316\u529f\u80fd\uff0c\u53ea\u4fdd\u7559\u4f60\u5728\u9879\u76ee\u4e2d\u5b9e\u9645\u4f7f\u7528\u5230\u7684 CSS \u7c7b\uff0c\u5e76\u5c06\u5b83\u4eec\u6253\u5305\u8fdb\u6700\u7ec8\u7684 CSS \u6587\u4ef6\u3002\u672a\u4f7f\u7528\u5230\u7684\u6240\u6709\u6837\u5f0f\u90fd\u4f1a\u88ab\u5254\u9664\u3002\u5bf9\u4e8e\u4e00\u4e2a\u5178\u578b\u9879\u76ee\uff0c\u6700\u7ec8\u751f\u6210\u7684 CSS \u6587\u4ef6\u5927\u5c0f\u901a\u5e38\u53ef\u4ee5\u63a7\u5236\u5728 10KB \u4ee5\u4e0b\uff0c\u8fd9\u6bd4\u8bb8\u591a\u4f20\u7edf\u6846\u67b6\u8981\u5c0f\u5f97\u591a\uff0c\u786e\u4fdd\u4e86\u51fa\u8272\u7684\u52a0\u8f7d\u6027\u80fd\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Dieser Artikel stellt das CSS-Framework Tailwind CSS systematisch vor \u2013 ein Framework, das Funktionalit\u00e4t an erster Stelle stellt. Mithilfe kombinierbarer \u201eAtomklassen\u201c kann man schnell Benutzeroberfl\u00e4chen erstellen. Die Kernkomponenten von Tailwind CSS umfassen ein praktisches System zur Benennung von Klassen, ein mobiles-first-Design, verschiedene Zustandsvarianten sowie die M\u00f6glichkeit zur tiefgreifenden Anpassung mithilfe von Konfigurationsdateien. Ziel des Artikels ist es, Entwicklern dabei zu helfen, die grundlegenden Arbeitsabl\u00e4ufe und praktischen Techniken von Tailwind CSS zu verstehen, um effiziente und individuell angepasste Frontend-Entwicklungen durchzuf\u00fchren.<\/p>","protected":false},"author":7,"featured_media":0,"template":"","meta":{"_acf_changed":false,"footnotes":""},"tags":[2257,2256,367,2301],"knowledge_category":[281],"class_list":["post-12366899","knowledge_post","type-knowledge_post","status-publish","hentry","tag-css-frameworks","tag-tailwind-css","tag-responsive-design","tag-practical-guides","knowledge_category-website-building"],"acf":{"site_seo_keywords":"Tailwind CSS, CSS\u6846\u67b6, \u5b9e\u7528\u7c7b, \u54cd\u5e94\u5f0f\u8bbe\u8ba1, \u72b6\u6001\u53d8\u4f53, \u81ea\u5b9a\u4e49\u914d\u7f6e, \u524d\u7aef\u5f00\u53d1\u6280\u5de7, \u539f\u5b50\u7c7b\u5de5\u4f5c\u6d41"},"_links":{"self":[{"href":"https:\/\/www.likacloud.com\/de\/wp-json\/wp\/v2\/knowledge_posts\/12366899","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.likacloud.com\/de\/wp-json\/wp\/v2\/knowledge_posts"}],"about":[{"href":"https:\/\/www.likacloud.com\/de\/wp-json\/wp\/v2\/types\/knowledge_post"}],"author":[{"embeddable":true,"href":"https:\/\/www.likacloud.com\/de\/wp-json\/wp\/v2\/users\/7"}],"version-history":[{"count":0,"href":"https:\/\/www.likacloud.com\/de\/wp-json\/wp\/v2\/knowledge_posts\/12366899\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.likacloud.com\/de\/wp-json\/wp\/v2\/media?parent=12366899"}],"wp:term":[{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.likacloud.com\/de\/wp-json\/wp\/v2\/tags?post=12366899"},{"taxonomy":"knowledge_category","embeddable":true,"href":"https:\/\/www.likacloud.com\/de\/wp-json\/wp\/v2\/knowledge_category?post=12366899"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}