<span>태그로 글씨 감싸서 각각 class명 지정해주기.
font-weight을 각각 다르게 설정해주기.(900까지 지원)
<form>
<div class="login_box">
<button class="login_btn" type="button">
<span class="bold">네이버</span>
<span class="light">로그인</span>
</button>
</div>
</form>
.login_box >button {
width: 300px;
height: 50px;
background-color: #03cf5d;
border-color: #03cf5d;
}
.login_btn{
font-size: 17px;
}
.bold{
font-weight: 900;
}
.light{
font-weight: 100;
}
더 두꺼운 글씨체를 원하면 폰트 자체를 변경해준다.
애초에 두꺼운 글씨체로 나오는 폰트를 적용해준다.
참고로 font-weight을 지원하지 않는 폰트도 있다.
pretendard는 한글 지원해주며, font-weight도 지원해주는 웹폰트.
windows, ios 에도 적용가능.
두꺼운 글씨체 Pretendard 적용방법>>https://belle-sooir.tistory.com/201
[react css] Pretendard 폰트 적용하기
@import로 폰트를 로드하는 부분은 CSS 파일에서 다른 스타일 규칙들보다 상단에 위치해야 제대로 적용됨.@import url('https://cdn.jsdelivr.net/npm/pretendard@latest/css/preload.css');@import url('https://cdn.jsdelivr.net/gh/
belle-sooir.tistory.com
'Framework > react' 카테고리의 다른 글
리액트 개발 환경 구축 (1) | 2025.04.11 |
---|---|
[react css] Pretendard 폰트 적용하기 (0) | 2025.03.14 |
[리액트 네이버 레이아웃 잡기] Target container is not a DOM element. at exports.createRoot 에러 해결 (0) | 2025.02.06 |
[react] 버튼 두번 누르면 1씩 증가하는 코드 만들기 Game4.js (0) | 2024.07.03 |
[리액트]클래스형 컴포넌트를 함수형 컴포넌트로 변환하기. (0) | 2024.06.20 |