English 中文(简体)
Tailwind CSS 甚至连这些班级都反映于超文本塔格。
原标题:The Tailwind CSS doesn t work even the classes reflect on the HTML Tag

I just don t know what went wrong here, the tailwind never works at the first try. In this screenshot shows that the html tag actually changes

我已经将我的全球组合改为这一组合。

@import "tailwindcss/base";

@import "tailwindcss/components";

@import "tailwindcss/utilities";

根据这一回答,stackover。 我还在<代码>tailwind.config.js中增加了一些内容。

/** @type {import( tailwindcss ).Config} */
module.exports = {
  **content: [
      "./pages/**/*.{js,ts,jsx,tsx,mdx}",
      "./components/**/*.{js,ts,jsx,tsx,mdx}",
      "./app/**/*.{js,ts,jsx,tsx,mdx}",
  ],**
  mode: "jit",
  theme: {
    extend: {
      fontFamily: {
        inter: ["Inter", "sans-serif"],
      },
      colors: {
        "black-100": "#2B2C35",
        "primary-blue": {
          DEFAULT: "#2B59FF",
          100: "#F5F8FF",
        },
        "secondary-orange": "#f79761",
        "light-white": {
          DEFAULT: "rgba(59,60,152,0.03)",
          100: "rgba(59,60,152,0.02)",
        },
        grey: "#747A88",
      },
      backgroundImage: {
         pattern : "url( /pattern.png )",
         hero-bg : "url( /hero-bg.png )"
      }
    },
  },
  plugins: [],
};

Also I was trying to do this command npx tailwind -i tailwind.css -o ./layouts/styles.css --watch it can t find the path, and then i changed it to npx tailwindcss -i build src/app/global.css -o public/styles.css and it says

[Error: EISDIR: illegal operation on a directory, read] {
  errno: -4068,
  code:  EISDIR ,
  syscall:  read 
}

不管怎么说,我还是用平时的指挥,而且我确实试图使用平时,而不是用上风,但都没有工作。 最后一部分是我的网页。 ts:

 use client 

import React from  react ;

export default function Home ()  {
  return (
    <div className="text-center mt-8">
     <h2 className= text-2xl font-semibold >Hello brow</h2>
    </div>
  );
}

我期望尾窗能够发挥作用,因为当我检查这个部件时,尾窗已经反映到超文本标签上。

问题回答

我不敢肯定,但确保Tailwind工程的三个方面是:

  • Global.css need

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

  • _app.js

import tailwindcss/tailwind.css

  • tailwind config
module.exports = {
  content: [
    "./app/**/*.{js,ts,jsx,tsx,mdx}",
    "./pages/**/*.{js,ts,jsx,tsx,mdx}",
    "./components/**/*.{js,ts,jsx,tsx,mdx}",
 
    // Or if using `src` directory:
    "./src/**/*.{js,ts,jsx,tsx,mdx}",
  ],
  theme: {
    extend: {
      colors: {
        git: {
          50: "#c778dd33",
          100:  #c778dd ,
        },
      }
    },
  },
  plugins: [],
}




相关问题
拆除月度边界(实际大型日历)

采用大型反应日历的Im, 并想要清除包罗日历的边界。 以及如何改变日记栏和日记的颜色? 如何使其发挥作用?

表中未显示的元数据

我将元件定义为如下文所示,但是在我的剪辑中,它没有显示“当地:3000/#home”。 我的所有jsx档案都有“用户”bc。

NextJS 13 Data Fetching

Is there anyway of custom baseURL for their fetch method? For example in axios: const instance = axios.create({ baseURL: https://some-domain.com/api/ , timeout: 1000, headers: { X-Custom-Header ...

热门标签