스타일 fontSizeAdjust 속성
예시
글꼴 크기 조정:
document.getElementById("demo").style.fontSizeAdjust = "0.58";
정의 및 사용
fontSizeAdjust 속성은 텍스트의 글꼴 종횡비 값을 설정하거나 반환합니다.
모든 글꼴에는 소문자 "x"와 대문자 "X" 사이의 크기 차이 인 가로 세로 값 이 있습니다.
fontSizeAdjust 속성을 사용하면 첫 번째 선택 글꼴을 사용할 수 없을 때 글꼴 크기를 더 잘 제어할 수 있습니다. 글꼴을 사용할 수 없는 경우 브라우저는 두 번째로 지정된 글꼴을 사용합니다. 이로 인해 글꼴 크기가 크게 변경될 수 있습니다. 이를 방지하려면 이 속성을 사용하십시오.
브라우저가 첫 번째 선택 글꼴의 가로 세로 값을 알고 있는 경우 브라우저는 두 번째 선택 글꼴로 텍스트를 표시할 때 사용할 글꼴 크기를 파악할 수 있습니다.
브라우저 지원
Property | |||||
---|---|---|---|---|---|
fontSizeAdjust | Not supported | Not supported | Yes | Not supported | Not supported |
통사론
fontSizeAdjust 속성을 반환합니다.
object.style.fontSizeAdjust
fontSizeAdjust 속성을 설정합니다.
object.style.fontSizeAdjust = "none|number|initial|inherit"
Value | Description |
---|---|
none | Default value. No font size adjustment |
number | Preserve the first-choice font's x-height, and calculate the aspect value ratio for the font. The formula that is used: font-size of first-choice font*(aspect value of first-choice font/aspect value of available font)=font-size to use on available font Example: If 14px Verdana (aspect value of 0.58) was unavailable, but the available font, Times New Roman, has an aspect value of 0.46, the adjusted font-size to use would be 14*(0.58/0.46) = 17.65px. |
initial | Sets this property to its default value. Read about initial |
inherit | Inherits this property from its parent element. Read about inherit |
기술적 세부 사항
기본값: | 없음 |
---|---|
반환 값: | 텍스트의 글꼴 종횡비 값을 나타내는 문자열 |
CSS 버전 | CSS3 |
관련 페이지
CSS 튜토리얼: CSS 글꼴
CSS 참조: 글꼴 크기 속성
HTML DOM 참조: 글꼴 속성
❮ 스타일 개체