I just started with Nuxtjs 3 .
However, I am currently working on the frontend, together with tailwind css and daisy ui.
Whenever I add some html code together with the appropriate css attributes from tailwind, it's just applied to one area.
Regardless if I add some divs or similar, it doesn't change. What did I miss?
Below is my code.
index.vue
<template>
<div
class="hero min-h-screen"
style="
background-image: url(https://api.lorem.space/image/fashion?w=1000&h=800);
"
>
<div class="hero-overlay bg-opacity-60"></div>
<div class="hero-content text-center text-neutral-content">
<div class="max-w-md">
<h1 class="mb-5 text-5xl font-bold">Hello there</h1>
<p class="mb-5">
Provident cupiditate voluptatem et in. Quaerat fugiat ut assumenda
excepturi exercitationem quasi. In deleniti eaque aut repudiandae et a
id nisi.
</p>
<button class="btn btn-primary">Get Started</button>
</div>
</div>
</div>
</template>
tailwind.config.js
module.exports = {
content: [
"./components/**/*.{js,vue,ts}",
"./layouts/**/*.vue",
"./pages/**/*.vue",
"./plugins/**/*.{js,ts}",
],
theme: {
extend: {},
},
plugins: [require("daisyui")],
}
nuxt.config.js
import { defineNuxtConfig } from 'nuxt3'
// https://v3.nuxtjs.org/docs/directory-structure/nuxt.config
export default defineNuxtConfig({
build: {
postcss: {
postcssOptions: {
plugins: {
tailwindcss: {},
autoprefixer: {},
},
},
},
},
css: [
"~/assets/css/tailwind.css"
],
})