tailwindcss not working after installing it with npm

Viewed 15

I've installed tailwindcss but it doesn't work as it should. i can't figure out why, it looks like it partially works

Directory file path:

in src/css:

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

in tailwind.config.js:

 @type {import('tailwindcss').Config} 
module.exports = {
  content: [''],
  theme: {
    extend: {},
  },
  plugins: [],
};

in index.html:

   <!DOCTYPE html>
    <html lang="en">
      <head>
        <meta charset="UTF-8" />
        <meta http-equiv="X-UA-Compatible" content="IE=edge" />
        <meta name="viewport" content="width=device-width, initial-scale=1.0" />
        <title>Document</title>
        <link rel="stylesheet" href="css/tailwind.css" />
      </head>
      <body>
        <div class="flex-column justify-center items-center h-screen">
          <div class="p-20 text-center">
            <h1 class="text-9xl">tailwindcss</h1>
            <div class="bg-green-200 hover:bg-green-500 p-10 text-4xl">
              Is now live on server !!
            </div>
            <div class="p-5 text-2xl">
              <a href="#" class="text-blue-500 hover:text-purple-700"
                >How to set up this tailwind CSS ?</a
              >
            </div>
          </div>
        </div>
      </body>
    </html>
0 Answers
Related