CSS font-weight 속성
예시
세 단락에 대해 다른 글꼴 두께 설정:
p.normal {
font-weight: normal;
}
p.thick {
font-weight: bold;
}
p.thicker {
font-weight: 900;
}
정의 및 사용
속성은 텍스트 의 font-weight
굵거나 가는 문자가 표시되어야 하는 정도를 설정합니다.
브라우저 지원
표의 숫자는 속성을 완전히 지원하는 첫 번째 브라우저 버전을 지정합니다.
Property | |||||
---|---|---|---|---|---|
font-weight | 2.0 | 4.0 | 1.0 | 1.3 | 3.5 |
CSS 구문
font-weight: normal|bold|bolder|lighter|number|initial|inherit;
속성 값
Value | Description | Play it |
---|---|---|
normal | Defines normal characters. This is default | |
bold | Defines thick characters | |
bolder | Defines thicker characters | |
lighter | Defines lighter characters | |
100 200 300 400 500 600 700 800 900 |
Defines from thin to thick characters. 400 is the same as normal, and 700 is the same as bold | |
initial | Sets this property to its default value. Read about initial | |
inherit | Inherits this property from its parent element. Read about inherit |
관련 페이지
CSS 튜토리얼: CSS 글꼴
CSS 참조: 글꼴 속성
HTML DOM 참조: fontWeight 속성