Front-end/React
[React] 특정 클래스태그 스타일 적용, 폰트 변경, 부트스트랩
Bay Im
2024. 3. 31. 13:32
- className 안의 특정 태그 스타일
- css에서 .클래스이름 태그이름 { … } 형식으로 스타일 주기
- ex) .className input { … }
- 폰트 변경
- css 파일에서 @import url(”구글폰트url”);
- * { font-family: “해당폰트이름”; } 으로 적용
- index.css
-
@import url("https://fonts.googleapis.com/css2?family=Hahmlet:wght@100..900&display=swap"); * { font-family: "Hahmlet", serif; font-optical-sizing: auto; font-weight: <weight>; font-style: normal; }
-
- 부트스트랩 사용
- index.js에 부트스트랩 import 하기
- import "bootstrap/dist/css/bootstrap.min.css";
- index.js에 부트스트랩 import 하기
728x90