{"id":12365421,"date":"2026-03-13T11:51:12","date_gmt":"2026-03-13T03:51:12","guid":{"rendered":"https:\/\/www.likacloud.com\/knowledge\/tailwind-css%e5%ae%8c%e5%85%a8%e6%8c%87%e5%8d%97%ef%bc%9a%e4%bb%8e%e5%ae%9e%e7%94%a8%e4%b8%bb%e4%b9%89%e5%b7%a5%e5%85%b7%e5%88%b0%e7%8e%b0%e4%bb%a3%e5%8c%96%e5%89%8d%e7%ab%af%e5%bc%80%e5%8f%91\/"},"modified":"2026-03-13T11:56:42","modified_gmt":"2026-03-13T03:56:42","slug":"tailwind-css-complete-guide-utility-first-modern-frontend-development","status":"publish","type":"knowledge_post","link":"https:\/\/www.likacloud.com\/ru\/knowledge\/website-building\/tailwind-css-complete-guide-utility-first-modern-frontend-development\/","title":{"rendered":"\u041f\u043e\u043b\u043d\u043e\u0435 \u0440\u0443\u043a\u043e\u0432\u043e\u0434\u0441\u0442\u0432\u043e \u043f\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044e Tailwind CSS: \u043e\u0442 \u043f\u0440\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0433\u043e \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u0430 \u0434\u043e \u0441\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445 \u043f\u0440\u0430\u043a\u0442\u0438\u043a \u0444\u0440\u043e\u043d\u0442\u0435\u043d\u0434-\u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0438"},"content":{"rendered":"\n<h2 class=\"wp-block-heading\">\u7406\u89e3Tailwind CSS\u7684\u5b9e\u7528\u4e3b\u4e49\u54f2\u5b66<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">\u5728\u5f53\u4eca\u524d\u7aef\u5f00\u53d1\u9886\u57df\uff0c\u5b9e\u7528\u4f18\u5148\u7684CSS\u6846\u67b6\u4ee5\u5176\u72ec\u7279\u7684\u5f00\u53d1\u8303\u5f0f\u9010\u6e10\u6210\u4e3a\u4e3b\u6d41\u3002<code>Tailwind CSS<\/code>\u5e76\u975e\u4f20\u7edf\u7684\u7ec4\u4ef6\u5e93\uff0c\u5b83\u662f\u4e00\u5957\u5e9e\u5927\u7684\u3001\u53ef\u7ec4\u5408\u7684\u5b9e\u7528\u7c7b\uff08Utility Classes\uff09\u96c6\u5408\uff0c\u5176\u54f2\u5b66\u6838\u5fc3\u5728\u4e8e\u201c\u5173\u6ce8\u5206\u79bb\u201d\u7684\u91cd\u65b0\u5b9a\u4e49\u3002\u4f20\u7edf\u7684CSS\u5f00\u53d1\u8bb2\u7a76\u5c06\u6837\u5f0f\u4e0eHTML\u7ed3\u6784\u5206\u79bb\uff0c\u800c<code>Tailwind CSS<\/code>\u5219\u5c06\u6837\u5f0f\u76f4\u63a5\u201c\u5185\u8054\u201d\u4e8eHTML\u5143\u7d20\u4e0a\uff0c\u901a\u8fc7\u7ec4\u5408\u7b80\u5355\u7684\u539f\u5b50\u7c7b\u6765\u6784\u5efa\u590d\u6742\u7684\u754c\u9762\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u8fd9\u79cd\u65b9\u6cd5\u6452\u5f03\u4e86\u5728\u6837\u5f0f\u8868\u4e2d\u5b9a\u4e49\u5177\u540d\u7c7b\u7684\u4f20\u7edf\u6d41\u7a0b\uff0c\u8f6c\u5411\u4e00\u4e2a\u66f4\u5177\u53ef\u9884\u6d4b\u6027\u548c\u9650\u5236\u6027\u7684\u7cfb\u7edf\u3002\u5f00\u53d1\u8005\u65e0\u9700\u5728<code>styles.css<\/code>\u6587\u4ef6\u4e2d\u7ede\u5c3d\u8111\u6c41\u5730\u6784\u601d\u7c7b\u540d\uff0c\u5982<code>.user-profile-card-with-shadow<\/code>\uff0c\u800c\u662f\u76f4\u63a5\u5728HTML\u4e2d\u4f7f\u7528\u5982<code>bg-white p-6 rounded-xl shadow-lg<\/code>\u8fd9\u6837\u7684\u7c7b\u7ec4\u5408\uff0c\u8fd9\u4e9b\u7c7b\u540d\u76f4\u63a5\u63cf\u8ff0\u4e86\u5b83\u4eec\u6240\u5e94\u7528\u7684\u6837\u5f0f\u3002\u8fd9\u770b\u4f3c\u8fdd\u53cd\u4e86\u201c\u5173\u6ce8\u5206\u79bb\u201d\u539f\u5219\uff0c\u5b9e\u5219\u5c06\u672c\u5e94\u5206\u6563\u5728\u591a\u4e2a\u6587\u4ef6\uff08HTML\u6a21\u677f\u3001CSS\u6587\u4ef6\u3001JavaScript\u72b6\u6001\uff09\u4e2d\u7684\u6837\u5f0f\u3001\u5e03\u5c40\u548c\u72b6\u6001\u903b\u8f91\uff0c\u66f4\u7d27\u5bc6\u5730\u7ed3\u5408\u5728\u540c\u4e00\u4e2a\u5143\u7d20\u58f0\u660e\u4e2d\uff0c\u5b9e\u73b0\u4e86\u66f4\u9ad8\u7ef4\u5ea6\u7684\u5173\u6ce8\u70b9\u805a\u5408\uff0c\u6781\u5927\u63d0\u5347\u4e86\u5f00\u53d1\u8005\u7684\u751f\u4ea7\u529b\u548cUI\u7684\u4e00\u81f4\u6027\u3002<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">\u6838\u5fc3\u529f\u80fd\u4e0e\u6838\u5fc3\u914d\u7f6e\u6587\u4ef6<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">\u8981\u9ad8\u6548\u4f7f\u7528<code>Tailwind CSS<\/code>\uff0c\u5fc5\u987b\u6df1\u523b\u7406\u89e3\u5176\u6838\u5fc3\u5de5\u4f5c\u539f\u7406\uff0c\u7279\u522b\u662f\u5176\u914d\u7f6e\u7cfb\u7edf\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">\u81ea\u5b9a\u4e49\u4e3b\u9898\u4e0e\u8bbe\u8ba1\u7cfb\u7edf<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">\u6838\u5fc3\u914d\u7f6e\u4e3b\u8981\u901a\u8fc7\u9879\u76ee\u6839\u76ee\u5f55\u4e0b\u7684<code>tailwind.config.js<\/code>\u6587\u4ef6\u5b9e\u73b0\u3002\u8fd9\u4e2a\u6587\u4ef6\u662f<code>Tailwind CSS<\/code>\u9879\u76ee\u7684\u5fc3\u810f\uff0c\u5b83\u5141\u8bb8\u60a8\u5b8c\u5168\u81ea\u5b9a\u4e49\u8bbe\u8ba1\u7cfb\u7edf\u3002\u60a8\u53ef\u4ee5\u5728\u5176\u4e2d\u8986\u76d6\u9ed8\u8ba4\u7684\u4e3b\u9898\u914d\u7f6e\uff0c\u4f8b\u5982\u6269\u5c55\u6216\u4fee\u6539\u8272\u5f69\u8c03\u8272\u677f\u3001\u95f4\u8ddd\u6bd4\u4f8b\u3001\u5b57\u4f53\u5927\u5c0f\u3001\u65ad\u70b9\u7b49\u3002\u8fd9\u4f7f\u5f97<code>Tailwind CSS<\/code>\u53ef\u4ee5\u8f7b\u677e\u9002\u914d\u4efb\u4f55\u516c\u53f8\u7684\u54c1\u724c\u8bbe\u8ba1\u6307\u5357\u3002<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code class=\"language-javascript\">\/\/ tailwind.config.js \u793a\u4f8b\nmodule.exports = {\n  content: [&#039;.\/src\/**\/*.{html,js}&#039;],\n  theme: {\n    extend: {\n      colors: {\n        &#039;primary&#039;: &#039;#1d4ed8&#039;,\n        &#039;secondary&#039;: &#039;#7e22ce&#039;,\n      },\n      spacing: {\n        &#039;128&#039;: &#039;32rem&#039;,\n      }\n    },\n  },\n  plugins: [],\n}<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">\u52a8\u6001\u6837\u5f0f\u7ba1\u7406\u4e0eJIT\u5f15\u64ce<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">\u53e6\u4e00\u4e2a\u6838\u5fc3\u662f\u5f3a\u5927\u7684JIT\uff08Just-In-Time\uff09\u5f15\u64ce\u3002\u5728JIT\u6a21\u5f0f\u542f\u7528\u540e\uff0c<code>Tailwind CSS<\/code>\u4e0d\u518d\u751f\u6210\u4e00\u4e2a\u5305\u542b\u6240\u6709\u53ef\u80fd\u7c7b\u522b\u7684\u3001\u4f53\u79ef\u5e9e\u5927\u7684CSS\u6587\u4ef6\uff0c\u800c\u662f\u52a8\u6001\u5730\u3001\u6309\u9700\u5730\u4e3a\u60a8\u5728\u9879\u76ee\u4e2d\u5b9e\u9645\u4f7f\u7528\u7684\u7c7b\u751f\u6210\u6837\u5f0f\u3002\u8fd9\u610f\u5473\u7740\u60a8\u53ef\u4ee5\u5b89\u5168\u5730\u4f7f\u7528\u4efb\u610f\u503c\uff0c\u5982<code>mt-[117px]<\/code>\u6216<code>bg-[#1da1f2]<\/code>\uff0c\u800c\u65e0\u9700\u63d0\u524d\u5728\u914d\u7f6e\u4e2d\u58f0\u660e\u3002JIT\u6a21\u5f0f\u663e\u8457\u51cf\u5c11\u4e86\u6784\u5efa\u5927\u5c0f\uff0c\u63d0\u9ad8\u4e86\u5f00\u53d1\u4f53\u9a8c\u548c\u6027\u80fd\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\/ru\/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\/ru\/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\/ru\/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\/ru\/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<h3 class=\"wp-block-heading\">\u54cd\u5e94\u5f0f\u4e0e\u72b6\u6001\u53d8\u4f53\u7684\u5e94\u7528<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">\u54cd\u5e94\u5f0f\u8bbe\u8ba1\u548c\u72b6\u6001\u53d8\u4f53\u662f\u6846\u67b6\u7684\u57fa\u77f3\u3002\u901a\u8fc7\u5728\u7c7b\u540d\u524d\u6dfb\u52a0\u524d\u7f00\uff0c\u53ef\u4ee5\u8f7b\u677e\u521b\u5efa\u54cd\u5e94\u5f0f\u8bbe\u8ba1\u3002\u4f8b\u5982\uff0c<code>md:flex<\/code>\u8868\u793a\u5728\u4e2d\u578b\u5c4f\u5e55\u4e0a\u5e94\u7528<code>flex<\/code>\u5e03\u5c40\u3002\u540c\u6837\uff0c\u72b6\u6001\u53d8\u4f53\u5982<code>hover:<\/code>\u3001<code>focus:<\/code>\u3001<code>active:<\/code>\u5141\u8bb8\u60a8\u4e3a\u4e0d\u540c\u7684\u4ea4\u4e92\u72b6\u6001\u5b9a\u4e49\u6837\u5f0f\uff0c\u4f8b\u5982<code>hover:bg-blue-700<\/code>\u3002<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">\u5b9e\u6218\uff1a\u4ece\u96f6\u6784\u5efa\u4e00\u4e2a\u73b0\u4ee3\u5361\u7247\u7ec4\u4ef6<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">\u8ba9\u6211\u4eec\u901a\u8fc7\u6784\u5efa\u4e00\u4e2a\u73b0\u4ee3\u5316\u7684\u7528\u6237\u4fe1\u606f\u5361\u7247\uff0c\u5c06\u7406\u8bba\u77e5\u8bc6\u4ed8\u8bf8\u5b9e\u8df5\u3002\u6211\u4eec\u5c06\u521b\u5efa\u4e00\u4e2a\u517c\u5177\u7f8e\u89c2\u548c\u54cd\u5e94\u5f0f\u7279\u6027\u7684\u7ec4\u4ef6\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u5047\u8bbe\u6211\u4eec\u7684\u5361\u7247\u9700\u8981\uff1a\u767d\u8272\u80cc\u666f\u3001\u5185\u90e8\u95f4\u8ddd\u3001\u5706\u89d2\u3001\u9634\u5f71\u3001\u54cd\u5e94\u5f0f\u5e03\u5c40\uff08\u5c0f\u5c4f\u5e55\u5782\u76f4\u3001\u5927\u5c4f\u5e55\u6c34\u5e73\uff09\uff0c\u4ee5\u53ca\u4e00\u4e2a\u4ea4\u4e92\u5f0f\u7684\u6309\u94ae\u3002<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code class=\"language-html\">&lt;!-- \u4e00\u4e2a\u4f7f\u7528Tailwind CSS\u6784\u5efa\u7684\u5361\u7247\u7ec4\u4ef6 --&gt;\n&lt;div class=&quot;max-w-md mx-auto bg-white rounded-2xl shadow-xl overflow-hidden md:max-w-2xl md:flex&quot;&gt;\n  &lt;div class=&quot;md:shrink-0&quot;&gt;\n    &lt;img class=&quot;h-48 w-full object-cover md:h-full md:w-48&quot; src=&quot;\/avatar.jpg&quot; alt=&quot;\u7528\u6237\u5934\u50cf&quot;&gt;\n  &lt;\/div&gt;\n  &lt;div class=&quot;p-8&quot;&gt;\n    &lt;div class=&quot;uppercase tracking-wide text-sm text-indigo-500 font-semibold&quot;&gt;\u524d\u7aef\u5de5\u7a0b\u5e08&lt;\/div&gt;\n    &lt;h2 class=&quot;mt-2 text-2xl font-bold text-gray-900&quot;&gt;\u5f20\u4e09&lt;\/h2&gt;\n    &lt;p class=&quot;mt-4 text-gray-500&quot;&gt;\u62e5\u6709\u8d85\u8fc75\u5e74\u7684Vue\u4e0eReact\u5f00\u53d1\u7ecf\u9a8c\uff0c\u4e13\u6ce8\u4e8e\u6784\u5efa\u9ad8\u6027\u80fd\u3001\u53ef\u8bbf\u95ee\u7684Web\u5e94\u7528\u7a0b\u5e8f\u3002&lt;\/p&gt;\n    &lt;div class=&quot;mt-6&quot;&gt;\n      &lt;button class=&quot;px-6 py-2.5 bg-gradient-to-r from-indigo-500 to-purple-600 text-white font-medium text-sm rounded-full shadow-lg hover:shadow-xl hover:from-indigo-600 transition-all duration-300 transform hover:-translate-y-0.5 focus:outline-none focus:ring-2 focus:ring-indigo-400 focus:ring-offset-2&quot;&gt;\n        \u8054\u7cfb\u6211\n      &lt;\/button&gt;\n    &lt;\/div&gt;\n  &lt;\/div&gt;\n&lt;\/div&gt;<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">\u5728\u8fd9\u4e2a\u793a\u4f8b\u4e2d\uff0c\u6211\u4eec\u4f7f\u7528\u4e86\u5927\u91cf\u5b9e\u7528\u7c7b\uff1a<code>max-w-md<\/code>\u3001<code>mx-auto<\/code>\u63a7\u5236\u6700\u5927\u5bbd\u5ea6\u548c\u5c45\u4e2d\uff1b<code>bg-white<\/code>\u3001<code>rounded-2xl<\/code>\u3001<code>shadow-xl<\/code>\u5b9a\u4e49\u5916\u89c2\uff1b<code>md:flex<\/code>\u548c<code>md:max-w-2xl<\/code>\u5b9e\u73b0\u54cd\u5e94\u5f0f\u5e03\u5c40\u53d8\u66f4\uff1b<code>hover:shadow-xl<\/code>\u548c<code>hover:-translate-y-0.5<\/code>\u6dfb\u52a0\u4e86\u60ac\u505c\u4ea4\u4e92\u6548\u679c\u3002\u8fd9\u79cd\u5199\u6cd5\u4f7f\u6837\u5f0f\u610f\u56fe\u6e05\u6670\u53ef\u89c1\uff0c\u65e0\u9700\u5728HTML\u548cCSS\u6587\u4ef6\u4e4b\u95f4\u5207\u6362\u3002<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">\u4e0e\u4e3b\u6d41\u524d\u7aef\u6846\u67b6\u96c6\u6210\u7684\u6700\u4f73\u5b9e\u8df5<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\"><code>Tailwind CSS<\/code>\u4e0e\u73b0\u4ee3\u524d\u7aef\u6846\u67b6\u7684\u96c6\u6210\u975e\u5e38\u6d41\u7545\uff0c\u8fd9\u4f7f\u5176\u6210\u4e3a\u6784\u5efa\u7ec4\u4ef6\u5316UI\u7684\u7406\u60f3\u9009\u62e9\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">\u5728React\u9879\u76ee\u4e2d\u7684\u6574\u5408<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">\u5728React\u9879\u76ee\u4e2d\uff0c\u60a8\u53ef\u4ee5\u76f4\u63a5\u5728JSX\u4e2d\u4f7f\u7528\u5b9e\u7528\u7c7b\u3002\u4e3a\u4e86\u907f\u514d\u7c7b\u540d\u8fc7\u957f\uff0c\u53ef\u4ee5\u4f7f\u7528<code>clsx<\/code>\u3001<code>classnames<\/code>\u6216Tailwind\u5b98\u65b9\u63a8\u8350\u7684<code>twMerge<\/code>\u5e93\u8fdb\u884c\u6761\u4ef6\u7c7b\u540d\u5408\u5e76\uff0c\u8fd9\u5728\u4e0e\u57fa\u4e8e\u72b6\u6001\u7684\u6837\u5f0f\u7ed3\u5408\u65f6\u5c24\u4e3a\u6709\u7528\u3002Next.js\u7b49\u5143\u6846\u67b6\u7684\u5b98\u65b9\u6a21\u677f\u4e5f\u5df2\u96c6\u6210\u4e86<code>Tailwind CSS<\/code>\u3002<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code class=\"language-javascript\">\/\/ React\u7ec4\u4ef6\u793a\u4f8b\nimport { useState } from &#039;react&#039;;\nimport { clsx } from &#039;clsx&#039;;\n\nfunction Notification({ message, type }) {\n  const [isVisible, setIsVisible] = useState(true);\n  const baseClasses = &quot;p-4 rounded-lg border shadow-sm&quot;;\n  const typeClasses = clsx({\n    &#039;bg-green-50 border-green-200 text-green-800&#039;: type === &#039;success&#039;,\n    &#039;bg-red-50 border-red-200 text-red-800&#039;: type === &#039;error&#039;,\n  });\n\nif (!isVisible) return null;\n  return (\n    &lt;div className={clsx(baseClasses, typeClasses)}&gt;\n      &lt;div className=&quot;flex justify-between items-center&quot;&gt;\n        &lt;p&gt;{message}&lt;\/p&gt;\n        &lt;button onClick={() =&gt; setIsVisible(false)} className=&quot;text-gray-400 hover:text-gray-600&quot;&gt;\n          \u2715\n        &lt;\/button&gt;\n      &lt;\/div&gt;\n    &lt;\/div&gt;\n  );\n}<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">\u5728Vue.js\u6216Svelte\u4e2d\u7684\u4f7f\u7528<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">\u5bf9\u4e8eVue.js\u5355\u6587\u4ef6\u7ec4\u4ef6\uff08SFC\uff09\uff0c\u60a8\u53ef\u4ee5\u5728\u90e8\u5206\u76f4\u63a5\u4f7f\u7528\u7c7b\u3002\u5728Svelte\u4e2d\u4ea6\u662f\u5982\u6b64\uff0c\u5b83\u4eec\u90fd\u80fd\u5f88\u597d\u5730\u4e0e<code>Tailwind CSS<\/code>\u7684JIT\u5f15\u64ce\u534f\u540c\u5de5\u4f5c\u3002\u5173\u952e\u5728\u4e8e\u6b63\u786e\u914d\u7f6e<code>tailwind.config.js<\/code>\u4e2d\u7684<code>content<\/code>\u5b57\u6bb5\uff0c\u4f7f\u5176\u80fd\u591f\u626b\u63cf\u5230\u60a8\u7684Vue\uff08<code>.vue<\/code>\uff09\u6216Svelte\uff08<code>.svelte<\/code>\uff09\u6587\u4ef6\uff0c\u4ee5\u786e\u4fddJIT\u5f15\u64ce\u80fd\u6b63\u786e\u63d0\u53d6\u6240\u4f7f\u7528\u7684\u7c7b\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">\u63d0\u53d6\u7ec4\u4ef6\u4e0e\u590d\u7528\u6a21\u5f0f<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">\u5c3d\u7ba1\u539f\u5b50\u7c7b\u7684\u590d\u7528\u6027\u5f88\u9ad8\uff0c\u4f46\u5f53\u67d0\u4e2aUI\u6a21\u5f0f\u91cd\u590d\u51fa\u73b0\u65f6\uff0c\u6700\u4f73\u5b9e\u8df5\u662f\u5c06\u5176\u63d0\u53d6\u4e3a\u6846\u67b6\u7684\u539f\u751f\u7ec4\u4ef6\u3002\u4f8b\u5982\uff0c\u5c06\u4e0a\u65b9\u7684\u5361\u7247\u5c01\u88c5\u6210\u4e00\u4e2a<code><\/code> React\u7ec4\u4ef6\u6216Vue\u7ec4\u4ef6\uff0c\u901a\u8fc7Props\u4f20\u9012\u5934\u50cf\u3001\u59d3\u540d\u3001\u804c\u4f4d\u7b49\u6570\u636e\u3002\u8fd9\u4fdd\u6301\u4e86\u6a21\u677f\u7684<code>DRY<\/code>\uff08Don't Repeat Yourself\uff09\u539f\u5219\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\/ru\/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\/ru\/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\/ru\/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<h2 class=\"wp-block-heading\">\u6027\u80fd\u4f18\u5316\u4e0e\u6784\u5efa\u7b56\u7565<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">\u4f7f\u7528<code>Tailwind CSS<\/code>\u65f6\uff0c\u6b63\u786e\u7684\u914d\u7f6e\u548c\u6784\u5efa\u7b56\u7565\u5bf9\u6700\u7ec8\u4ea7\u7269\u7684\u6027\u80fd\u81f3\u5173\u91cd\u8981\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u542f\u7528JIT\u6a21\u5f0f\u662f\u9996\u8981\u7684\u4f18\u5316\u6b65\u9aa4\u3002\u8fd9\u9700\u8981\u5728<code>tailwind.config.js<\/code>\u4e2d\u8bbe\u7f6e<code>mode: 'jit'<\/code>\uff0c\u6216\u4f7f\u7528PostCSS\u914d\u7f6e\u3002\u6b64\u5916\uff0c\u5fc5\u987b\u7cbe\u786e\u914d\u7f6e<code>content<\/code>\u8def\u5f84\u3002\u4e00\u4e2a\u8fc7\u4e8e\u5bbd\u6cdb\u7684\u8def\u5f84\uff08\u5982<code>.\/**\/*.{html,js}<\/code>\uff09\u53ef\u80fd\u5bfc\u81f4\u6784\u5efa\u8fc7\u7a0b\u626b\u63cf\u4e0d\u5fc5\u8981\u7684<code>node_modules<\/code>\u76ee\u5f55\uff0c\u964d\u4f4e\u6784\u5efa\u901f\u5ea6\u3002\u800c\u8def\u5f84\u8fc7\u4e8e\u72ed\u7a84\uff0c\u5219\u53ef\u80fd\u5bfc\u81f4\u751f\u4ea7\u73af\u5883\u4e2d\u7f3a\u5c11\u67d0\u4e9b\u52a8\u6001\u751f\u6210\u7684\u6837\u5f0f\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u901a\u8fc7\u4f7f\u7528<code>@apply<\/code>\u6307\u4ee4\u63d0\u53d6\u91cd\u590d\u7684\u5b9e\u7528\u7c7b\u7ec4\u5408\uff0c\u53ef\u4ee5\u5728\u4e00\u5b9a\u7a0b\u5ea6\u4e0a\u4fdd\u6301CSS\u7684<code>DRY<\/code>\u6027\uff0c\u4f46\u9700\u8c28\u614e\u4f7f\u7528\u3002<code>@apply<\/code>\u9002\u7528\u4e8e\u5c0f\u8303\u56f4\u3001\u9ad8\u5ea6\u91cd\u590d\u4e14\u8bed\u4e49\u660e\u786e\u7684\u6837\u5f0f\u96c6\u5408\uff0c\u4f8b\u5982\u4e00\u4e2a\u6309\u94ae\u7684\u57fa\u7840\u6837\u5f0f\u3002\u8fc7\u5ea6\u4f7f\u7528\u4f1a\u91cd\u65b0\u5f15\u5165\u4f20\u7edfCSS\u7684\u7ef4\u62a4\u96be\u9898\u3002<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code class=\"language-css\">\/* \u8c28\u614e\u4f7f\u7528 @apply *\/\n.btn-primary {\n  @apply px-4 py-2 font-semibold rounded-lg shadow-md;\n  @apply bg-blue-600 text-white;\n  @apply 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\">\u6700\u540e\uff0c\u52a1\u5fc5\u5728\u751f\u4ea7\u6784\u5efa\u4e2d\u542f\u7528CSS\u538b\u7f29\uff08\u5982\u4f7f\u7528<code>cssnano<\/code>\uff09\u548c\u6e05\u9664\u672a\u4f7f\u7528\u7684\u6837\u5f0f\uff08Purge CSS\u529f\u80fd\u5df2\u96c6\u6210\u5728JIT\u4e2d\uff09\uff0c\u4ee5\u786e\u4fdd\u6700\u7ec8\u7684CSS\u6587\u4ef6\u4f53\u79ef\u6700\u5c0f\u3002<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">\u603b\u7ed3<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\"><code>Tailwind CSS<\/code>\u4ee5\u5176\u72ec\u7279\u7684\u5b9e\u7528\u4e3b\u4e49\u54f2\u5b66\uff0c\u5f7b\u5e95\u6539\u53d8\u4e86\u5f00\u53d1\u8005\u7f16\u5199\u548c\u7ef4\u62a4\u6837\u5f0f\u7684\u65b9\u5f0f\u3002\u5b83\u901a\u8fc7\u63d0\u4f9b\u4e00\u5957\u5b8c\u6574\u3001\u53ef\u5b9a\u5236\u3001\u4e14\u53ef\u76f4\u63a5\u7ec4\u5408\u7684\u539f\u5b50\u7c7b\u5de5\u5177\u96c6\uff0c\u5c06\u98ce\u683c\u7ea6\u675f\u5728\u8bbe\u8ba1\u7cfb\u7edf\u4e4b\u5185\uff0c\u540c\u65f6\u4fdd\u7559\u4e86\u6781\u5927\u7684\u7075\u6d3b\u6027\u3002\u4ece\u7406\u89e3\u5176\u6838\u5fc3\u914d\u7f6e\u4e0e\u52a8\u6001\u7684JIT\u5f15\u64ce\uff0c\u5230\u5728\u5b9e\u9645\u9879\u76ee\u4e2d\u6784\u5efa\u7ec4\u4ef6\u5e76\u4e0e\u73b0\u4ee3\u524d\u7aef\u6846\u67b6\u65e0\u7f1d\u96c6\u6210\uff0c\u518d\u5230\u5b9e\u65bd\u5173\u952e\u7684\u6784\u5efa\u4f18\u5316\u7b56\u7565\uff0c\u638c\u63e1\u8fd9\u6761\u5b66\u4e60\u8def\u5f84\u5c06\u5e2e\u52a9\u60a8\u663e\u8457\u63d0\u5347UI\u5f00\u53d1\u6548\u7387\u4e0e\u4e00\u81f4\u6027\u3002\u5b83\u4e0d\u662f\u9002\u5408\u6240\u6709\u9879\u76ee\u7684\u94f6\u5f39\uff0c\u4f46\u5bf9\u4e8e\u8ffd\u6c42\u5feb\u901f\u8fed\u4ee3\u3001\u9ad8\u5b9a\u5236\u5316\u548c\u56e2\u961f\u534f\u4f5c\u7684\u73b0\u4ee3Web\u5f00\u53d1\u9879\u76ee\u800c\u8a00\uff0c\u65e0\u7591\u662f\u4e00\u4e2a\u5f3a\u5927\u800c\u9ad8\u6548\u7684\u89e3\u51b3\u65b9\u6848\u3002<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">FAQ \u5e38\u89c1\u95ee\u9898<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">### Tailwind CSS\u662f\u5426\u4f1a\u5bfc\u81f4HTML\u8fc7\u4e8e\u81c3\u80bf\uff1f<br \/>\n\u786e\u5b9e\uff0c\u4f7f\u7528<code>Tailwind CSS<\/code>\u540e\uff0cHTML\u5143\u7d20\u4e0a\u7684<code>class<\/code>\u5c5e\u6027\u4f1a\u53d8\u5f97\u5f88\u957f\u3002\u8fd9\u53ef\u4ee5\u88ab\u89c6\u4e3a\u4e00\u79cd\u5c06\u6837\u5f0f\u58f0\u660e\u201c\u5185\u8054\u201d\u7684\u4ee3\u4ef7\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\/ru\/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\/ru\/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\/ru\/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<p class=\"wp-block-paragraph\">\u7136\u800c\uff0c\u76f8\u8f83\u4e8e\u4f20\u7edf\u65b9\u5f0f\u4e0b\u5206\u6563\u5728\u591a\u4e2aCSS\u6587\u4ef6\u4e2d\u7684\u3001\u53ef\u80fd\u672a\u88ab\u4f7f\u7528\u7684\u6837\u5f0f\u89c4\u5219\uff0c\u8fd9\u4e9b\u7c7b\u540d\u5f80\u5f80\u662f\u9ad8\u5ea6\u538b\u7f29\u548c\u8bed\u4e49\u660e\u786e\u7684\u3002\u5de5\u5177\u5982Prettier\u7684\u201cTailwind CSS\u6392\u5e8f\u201d\u63d2\u4ef6\u53ef\u4ee5\u81ea\u52a8\u6574\u7406\u7c7b\u540d\u987a\u5e8f\uff0c\u63d0\u9ad8\u53ef\u8bfb\u6027\u3002\u4ece\u6574\u4f53\u9879\u76ee\u7ef4\u62a4\u548c\u6027\u80fd\uff08\u5f97\u76ca\u4e8eJIT\uff09\u89d2\u5ea6\u770b\uff0c\u8fd9\u79cd\u201c\u81c3\u80bf\u201d\u5e38\u5e38\u662f\u53ef\u63a5\u53d7\u7684\uff0c\u5e76\u88ab\u5176\u5e26\u6765\u7684\u5f00\u53d1\u901f\u5ea6\u4f18\u52bf\u548c\u6837\u5f0f\u4e00\u81f4\u6027\u6240\u62b5\u6d88\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">\u5982\u4f55\u4e3aTailwind CSS\u6dfb\u52a0\u81ea\u5b9a\u4e49\u7684\u975e\u6807\u51c6\u6837\u5f0f\uff1f<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\"><code>Tailwind CSS<\/code>\u63d0\u4f9b\u4e86\u591a\u79cd\u65b9\u5f0f\u6765\u6269\u5c55\u3002\u6700\u5e38\u89c1\u7684\u662f\u5728<code>tailwind.config.js<\/code>\u7684<code>theme.extend<\/code>\u90e8\u5206\u6dfb\u52a0\u81ea\u5b9a\u4e49\u7684\u989c\u8272\u3001\u95f4\u8ddd\u6216\u5b57\u4f53\u5927\u5c0f\u3002\u5bf9\u4e8e\u4efb\u610f\u503c\uff0c\u53ef\u4ee5\u76f4\u63a5\u5728\u7c7b\u540d\u4e2d\u4f7f\u7528\u65b9\u62ec\u53f7\u8bed\u6cd5\uff0c\u5982<code>top-[117px]<\/code>\uff0c\u8fd9\u5728JIT\u6a21\u5f0f\u4e0b\u5b8c\u5168\u652f\u6301\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u5bf9\u4e8e\u66f4\u590d\u6742\u3001\u72ec\u4e00\u65e0\u4e8c\u7684\u6837\u5f0f\uff0c\u6700\u4f73\u5b9e\u8df5\u4ecd\u7136\u662f\u7f16\u5199\u4f20\u7edf\u7684CSS\u89c4\u5219\uff0c\u5e76\u6dfb\u52a0\u5230\u60a8\u7684\u5168\u5c40\u6837\u5f0f\u8868\u4e2d\u3002<code>Tailwind CSS<\/code>\u4e0d\u4f1a\u963b\u6b62\u60a8\u8fd9\u6837\u505a\uff0c\u60a8\u53ef\u4ee5\u5728\u540c\u4e00\u4e2a\u9879\u76ee\u4e2d\u6df7\u5408\u4f7f\u7528\u4e24\u8005\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">\u5728\u56e2\u961f\u9879\u76ee\u4e2d\uff0c\u5982\u4f55\u4fdd\u6301Tailwind CSS\u4f7f\u7528\u7684\u4e00\u81f4\u6027\uff1f<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">\u4fdd\u6301\u4e00\u81f4\u6027\u9700\u8981\u7ed3\u5408\u6280\u672f\u914d\u7f6e\u548c\u56e2\u961f\u89c4\u8303\u3002\u9996\u5148\uff0c\u5171\u4eab\u5e76\u7248\u672c\u5316\u4e00\u4e2a\u7edf\u4e00\u7684<code>tailwind.config.js<\/code>\u6587\u4ef6\uff0c\u786e\u4fdd\u6240\u6709\u5f00\u53d1\u8005\u57fa\u4e8e\u540c\u4e00\u5957\u8bbe\u8ba1Token\uff08\u989c\u8272\u3001\u95f4\u8ddd\u7b49\uff09\u5de5\u4f5c\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u5176\u6b21\uff0c\u5236\u5b9a\u56e2\u961f\u4e66\u5199\u89c4\u8303\uff0c\u4f8b\u5982\u4f7f\u7528Prettier\u63d2\u4ef6\u5bf9\u7c7b\u540d\u8fdb\u884c\u81ea\u52a8\u6392\u5e8f\uff08\u4ece\u5e03\u5c40\u3001\u5b9a\u4f4d\u5230\u5916\u89c2\u72b6\u6001\uff09\uff0c\u8fd9\u80fd\u6781\u5927\u7edf\u4e00\u4ee3\u7801\u98ce\u683c\u3002\u6700\u540e\uff0c\u9f13\u52b1\u5c06\u91cd\u590d\u7684UI\u6a21\u5f0f\uff08\u5982\u5361\u7247\u3001\u6309\u94ae\u3001\u6a21\u6001\u6846\uff09\u63d0\u53d6\u4e3a\u53ef\u590d\u7528\u7684\u6846\u67b6\u7ec4\u4ef6\uff0c\u8fd9\u80fd\u4ece\u6839\u6e90\u4e0a\u51cf\u5c11\u4e0d\u4e00\u81f4\u7684\u539f\u5b50\u7c7b\u7ec4\u5408\u6563\u843d\u5728\u9879\u76ee\u5404\u5904\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Tailwind CSS\u5bf9\u65e0\u969c\u788d\u8bbf\u95ee\u652f\u6301\u5982\u4f55\uff1f<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\"><code>Tailwind CSS<\/code>\u672c\u8eab\u662f\u4e00\u4e2a\u6837\u5f0f\u5de5\u5177\uff0c\u4e0d\u76f4\u63a5\u63d0\u4f9b\u65e0\u969c\u788d\uff08A11y\uff09\u8bed\u4e49\u3002\u7136\u800c\uff0c\u5b83\u63d0\u4f9b\u4e86\u8bb8\u591a\u6709\u52a9\u4e8e\u5b9e\u73b0\u65e0\u969c\u788d\u8bbf\u95ee\u7684\u5b9e\u7528\u7c7b\uff0c\u4f8b\u5982<code>sr-only<\/code>\uff08\u4ec5\u5bf9\u5c4f\u5e55\u9605\u8bfb\u5668\u53ef\u89c1\uff09\u3001<code>focus:<\/code>\u53d8\u4f53\u7528\u4e8e\u7ba1\u7406\u7126\u70b9\u6837\u5f0f\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u5b9e\u73b0\u826f\u597d\u65e0\u969c\u788d\u8bbf\u95ee\u7684\u5173\u952e\u5728\u4e8e\u5f00\u53d1\u8005\u3002\u60a8\u9700\u8981\u4f7f\u7528\u8bed\u4e49\u5316\u7684HTML\u5143\u7d20\uff08\u5982<code>button<\/code>\u3001<code>nav<\/code>\uff09\u5e76\u8bbe\u7f6e\u6b63\u786e\u7684ARIA\u5c5e\u6027\uff08\u5982<code>aria-label<\/code>\uff09\uff0c<code>Tailwind CSS<\/code>\u7684\u7c7b\u53ea\u662f\u7528\u6765\u4e3a\u8fd9\u4e9b\u5143\u7d20\u6dfb\u52a0\u6837\u5f0f\u3002\u6846\u67b6\u5728\u63d0\u4f9b\u53ef\u63a7\u7126\u70b9\u6837\u5f0f\u7b49\u65b9\u9762\u7ed9\u4e88\u4e86\u5f88\u597d\u7684\u652f\u6301\uff0c\u4f46\u6700\u7ec8\u7684\u8bbf\u95ee\u6027\u8d23\u4efb\u5728\u4e8e\u5f00\u53d1\u8005\u5982\u4f55\u6784\u5efaHTML\u7ed3\u6784\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u0412 \u0434\u0430\u043d\u043d\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u0441\u0438\u0441\u0442\u0435\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u0440\u0430\u0441\u0441\u043c\u0430\u0442\u0440\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u043f\u0440\u0430\u0433\u043c\u0430\u0442\u0438\u0447\u043d\u044b\u0439 \u043f\u043e\u0434\u0445\u043e\u0434 \u043a \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0435 \u0441 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435\u043c \u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a\u0430 Tailwind CSS, \u0430 \u0442\u0430\u043a\u0436\u0435 \u043e\u0431\u044a\u044f\u0441\u043d\u044f\u0435\u0442\u0441\u044f \u0435\u0433\u043e \u043e\u0441\u043d\u043e\u0432\u043d\u0430\u044f \u0444\u0438\u043b\u043e\u0441\u043e\u0444\u0438\u044f, \u0437\u0430\u043a\u043b\u044e\u0447\u0430\u044e\u0449\u0430\u044f\u0441\u044f \u0432 \u0438\u043d\u0442\u0435\u0433\u0440\u0430\u0446\u0438\u0438 \u0441\u0442\u0438\u043b\u0435\u0439 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043a\u043e\u043c\u0431\u0438\u043d\u0430\u0446\u0438\u0439 \u0430\u0442\u043e\u043c\u0430\u0440\u043d\u044b\u0445 \u043a\u043b\u0430\u0441\u0441\u043e\u0432. \u041f\u043e\u0434\u0440\u043e\u0431\u043d\u043e \u043e\u043f\u0438\u0441\u044b\u0432\u0430\u044e\u0442\u0441\u044f \u0442\u0430\u043a\u0438\u0435 \u043a\u043b\u044e\u0447\u0435\u0432\u044b\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0438, \u043a\u0430\u043a \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u0441\u043a\u043e\u0433\u043e \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u0430, \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u044f \u043a\u043e\u0434\u0430 \u0432 \u0440\u0435\u0430\u043b\u044c\u043d\u043e\u043c \u0432\u0440\u0435\u043c\u0435\u043d\u0438 (JIT-\u043c\u0435\u0445\u0430\u043d\u0438\u0437\u043c) \u043f\u043e \u043c\u0435\u0440\u0435 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0441\u0442\u0438, \u0430 \u0442\u0430\u043a\u0436\u0435 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u0440\u0435\u0430\u043a\u0442\u0438\u0432\u043d\u044b\u0445 \u0432\u0435\u0440\u0441\u0438\u0439 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u043e\u0432. \u041d\u0430 \u043f\u0440\u0438\u043c\u0435\u0440\u0435 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u0441\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0433\u043e \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u0430 \u0432 \u0432\u0438\u0434\u0435 \u043a\u0430\u0440\u0442\u043e\u0447\u043a\u0438 \u0434\u0435\u043c\u043e\u043d\u0441\u0442\u0440\u0438\u0440\u0443\u0435\u0442\u0441\u044f \u044d\u0444\u0444\u0435\u043a\u0442\u0438\u0432\u043d\u043e\u0435 \u043f\u0440\u0438\u043c\u0435\u043d\u0435\u043d\u0438\u0435 Tailwind CSS \u0432 \u043f\u0440\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0439 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0435.<\/p>","protected":false},"author":7,"featured_media":0,"template":"","meta":{"_acf_changed":false,"footnotes":""},"tags":[],"knowledge_category":[281],"class_list":["post-12365421","knowledge_post","type-knowledge_post","status-publish","hentry","knowledge_category-website-building"],"acf":{"site_seo_keywords":"Tailwind CSS,\u5b9e\u7528\u4e3b\u4e49CSS\u6846\u67b6,\u524d\u7aef\u5f00\u53d1\u5b9e\u8df5,\u6838\u5fc3\u914d\u7f6e,JIT\u5f15\u64ce,\u54cd\u5e94\u5f0f\u8bbe\u8ba1,\u6784\u5efa\u5361\u7247\u7ec4\u4ef6,\u539f\u5b50\u7c7b\u7ec4\u5408"},"_links":{"self":[{"href":"https:\/\/www.likacloud.com\/ru\/wp-json\/wp\/v2\/knowledge_posts\/12365421","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.likacloud.com\/ru\/wp-json\/wp\/v2\/knowledge_posts"}],"about":[{"href":"https:\/\/www.likacloud.com\/ru\/wp-json\/wp\/v2\/types\/knowledge_post"}],"author":[{"embeddable":true,"href":"https:\/\/www.likacloud.com\/ru\/wp-json\/wp\/v2\/users\/7"}],"version-history":[{"count":0,"href":"https:\/\/www.likacloud.com\/ru\/wp-json\/wp\/v2\/knowledge_posts\/12365421\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.likacloud.com\/ru\/wp-json\/wp\/v2\/media?parent=12365421"}],"wp:term":[{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.likacloud.com\/ru\/wp-json\/wp\/v2\/tags?post=12365421"},{"taxonomy":"knowledge_category","embeddable":true,"href":"https:\/\/www.likacloud.com\/ru\/wp-json\/wp\/v2\/knowledge_category?post=12365421"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}