簡體   English   中英

順風 CSS 未編譯 CSS

[英]Tailwind CSS not compiling CSS

所以我正在使用 Tailwind CSS 沒有編譯我提到的 HTML CSS。

/** @type {import('tailwindcss').Config} */
module.exports = {
  content: [
    "./public/logs.html"
  ],
  theme: {
    extend: {},
  },
  plugins: [],
}

Could you post other files as well such as your package.json , and the .html file where you are either importing the compiled CSS or where you are importing the CSS file with the @tailwind decorators?

選項

  1. You can either run npx tailwindcss -i./path_to_input.css -o./path_to_output.css --watch while you are developing and make sure to import the outputted CSS file in your .html file.
  2. 如果您正在使用某種構建系統進行開發,那么您只需將以下行添加到您的.html文件中。
<link href="path_to_output.css" rel="stylesheet" />

如果您正在執行選項 2 ,請確保您的output.css文件看起來像這樣:

@tailwind base;
@tailwind components;
@tailwind utilities; 

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM