讓畫面更精美跟客製化,今天來加入 Tailwind CSS
npm install tailwindcss postcss autoprefixer
tailwind.config.js
和 postcss.config.js
npx tailwindcss init -p
tailwind.config.js
輸入以下配置
export default {
mode: "jit",
content: ["./src/**/*.{vue,js}"],
theme: {
extend: {},
},
plugins: [],
};
postcss.config.js
輸入以下配置
export default {
plugins: {
tailwindcss: {},
autoprefixer: {},
},
}
@import "tailwindcss/base";
@import "tailwindcss/components";
@import "tailwindcss/utilities";
import './theme/tailwind.css'
這樣配置就沒問題了!