리액트에서 원하는 폰트 사용하기(이모션 이용)

Jaeyeon·2021년 11월 25일
0

코드캠프

목록 보기
15/33

몰랐던 사실 하나.. 구글 웹폰트에서 제공하는 폰트는 무료로 다운받을 수 있다.

https://fonts.google.com/specimen/Libre+Baskerville?query=Libre+Baskerville#standard-styles

사진 오른쪽 위 download family에서 font를 다운받을 수 있다.

import styled from "@emotion/styled";

그리고 styled를 가져온 페이지에..

export const HeaderNu = styled.div`
  /* height: 100px; */
  font-family: "Libre Baskerville", serif;
  font-size: 30px;
  color: pink;
  font-weight: bold;
  margin-left: 0px;
  padding-top: 31px;
`;

font-family: "폰트 이름"

을 적으면 끝!

0개의 댓글

관련 채용 정보