1. 설치
yarn add -D tailwindcss postcss autoprefixer
npx tailwindcss init -p
2. tailwind 경로 지정 (tailwind.config.js)
/** @type {import('tailwindcss').Config} */
export default {
content: ["./index.html", "./src/**/*.{js,jsx,ts,tsx}"],
theme: {
extend: {},
},
plugins: [],
};
3. index.css 수정
@tailwind base;
@tailwind components;
@tailwind utilities;
'HTML + CSS' 카테고리의 다른 글
[Notiflix / CSS] 라이브러리 스타일 커스텀하기 (1) | 2024.11.03 |
---|---|
[Tailwind] 부모 요소가 hover 상태일 때 자식 요소 스타일 지정하기 (group) (0) | 2024.09.10 |
[CSS] Safari z-index (1) | 2024.07.30 |
[JS / jQuery / CSS] 다양한 방법으로 자동스크롤 구현하기 (원페이지 스크롤) (0) | 2024.07.22 |
[CSS] 화면 크기에 따라 폰트사이즈 조정하기 (0) | 2024.07.17 |