Notice
Recent Posts
Recent Comments
Link
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | ||||||
2 | 3 | 4 | 5 | 6 | 7 | 8 |
9 | 10 | 11 | 12 | 13 | 14 | 15 |
16 | 17 | 18 | 19 | 20 | 21 | 22 |
23 | 24 | 25 | 26 | 27 | 28 |
Tags
- Camera Zoom
- --watch
- react
- Unity Editor
- SDK upgrade
- Git
- mongoDB
- springboot
- linux
- screencapture
- Unity IAP
- java
- rpg server
- nodejs
- css framework
- express
- Google Refund
- critical rendering path
- unity
- Camera Movement
- OverTheWire
- MySQL
- Google Developer API
- spread 연산자
- Packet Network
- server
- docker
- draganddrop
- Spring Boot
- Digital Ocean
Archives
- Today
- Total
우당탕탕 개발일지
[React] CSS Framework : TailWind CSS 사용하기 본문
공식문서
https://tailwindcss.com/docs/installation
1. VSCode 에서 TailWindCSS IntelliSense 설치
2. 프로젝트에 TailWindCSS 다운로드 및 init
## 3가지 모듈 다운로드. -D 옵션은 개발에서 사용한다는 의미. -development
npm install -D tailwindcss
npx tailwindcss init
3. tailwind.config.js 작성
현재 자신의 프로젝트중 src폴더의 위치 파악한 뒤 아래와 같이 입력함
/** tailwind.config.js */
/** @type {import('tailwindcss').Config} */
module.exports = {
content: ["./src/**/*.{html,js}"],
theme: {
extend: {},
},
plugins: [],
};
4. css 파일에 @tailwind 추가. (App.css)
//App.css
@tailwind base;
@tailwind components;
@tailwind utilities;
//code시작
...
이런 경고가 뜰 경우 VSCode에서 PostCSS Language Support 확장 프로그램 설치
5. 사용하기
App.js 에 다음과같이 underline 을 주고 실행 > 정상적으로 underline 적용되는 것을 확인.
<h1 className="text-3xl font-bold underline">hello world!</h1>
'Client' 카테고리의 다른 글
Web 기초 (0) | 2024.08.01 |
---|---|
[React] react-beautiful-dnd : Drag and Drop 구현하기 (0) | 2024.05.21 |
[React] Hooks 왜쓰는데?? : 함수형 컴포넌트는 라이징스타 (0) | 2024.05.18 |
[React] state 를 이용하여 데이터 추가,삭제,변경 (0) | 2024.05.17 |
[React] JSX 리스트 반복 출력 : map (0) | 2024.05.16 |