목록2024/02/12 (1)
JiSoo's Devlog

리액트에 CSS 적용하는 3가지 방법1. CSS 파일 만들어서 import2. style prop으로 자바스크립트 객체로 스타일 코드 넣어주기 style={{ }}3. CSS 모듈 사용하기 ~~.module.cssCSS 모듈 방식은 className을 랜덤하게 만들어 줘서 이름이 겹칠 걱정 필요 X styled componentsstyled components는 다크 모드, 라이트 모드같은 걸 엄청 쉬운 방식으로 만들 수 있게 도와준다npm i styled-components 백틱(``) 안에 css 코드 쓰기const Father = styled.div`` styled를 import 하고 HTML 태그 사용하기import styled from "styled-components";const Fathe..
Frontend/React
2024. 2. 12. 23:00