1. 타이포그래피
  2. font-stretch

타이포그래피

font-stretch

폰트 너비를 선택하는 유틸리티입니다.

ClassStyles
font-stretch-ultra-condensed
font-stretch: ultra-condensed; /* 50% */
font-stretch-extra-condensed
font-stretch: extra-condensed; /* 62.5% */
font-stretch-condensed
font-stretch: condensed; /* 75% */
font-stretch-semi-condensed
font-stretch: semi-condensed; /* 87.5% */
font-stretch-normal
font-stretch: normal; /* 100% */
font-stretch-semi-expanded
font-stretch: semi-expanded; /* 112.5% */
font-stretch-expanded
font-stretch: expanded; /* 125% */
font-stretch-extra-expanded
font-stretch: extra-expanded; /* 150% */
font-stretch-ultra-expanded
font-stretch: ultra-expanded; /* 200% */
font-stretch-<percentage>
font-stretch: <percentage>;
font-stretch-(<custom-property>)
font-stretch: var(<custom-property>);
font-stretch-[<value>]
font-stretch: <value>;

예제

기본 예제

font-stretch-condensedfont-stretch-expanded 같은 유틸리티를 사용해 폰트의 너비를 설정할 수 있습니다:

font-stretch-extra-condensed

The quick brown fox jumps over the lazy dog.

font-stretch-condensed

The quick brown fox jumps over the lazy dog.

font-stretch-normal

The quick brown fox jumps over the lazy dog.

font-stretch-expanded

The quick brown fox jumps over the lazy dog.

font-stretch-extra-expanded

The quick brown fox jumps over the lazy dog.

<p class="font-stretch-extra-condensed">The quick brown fox...</p><p class="font-stretch-condensed">The quick brown fox...</p><p class="font-stretch-normal">The quick brown fox...</p><p class="font-stretch-expanded">The quick brown fox...</p><p class="font-stretch-extra-expanded">The quick brown fox...</p>

이 기능은 여러 너비 변형이 있는 폰트에만 적용됩니다. 그렇지 않은 경우, 브라우저는 가장 가까운 값을 선택합니다.

백분율 사용하기

font-stretch-50%font-stretch-125% 같은 font-stretch-<percentage> 유틸리티를 사용하여 폰트의 너비를 백분율로 설정할 수 있습니다:

font-stretch-50%

The quick brown fox jumps over the lazy dog.

font-stretch-100%

The quick brown fox jumps over the lazy dog.

font-stretch-150%

The quick brown fox jumps over the lazy dog.

<p class="font-stretch-50%">The quick brown fox...</p><p class="font-stretch-100%">The quick brown fox...</p><p class="font-stretch-150%">The quick brown fox...</p>

커스텀 값 사용하기

font-stretch-[<value>] 구문을 사용하세요 font width를 완전히 커스텀한 값으로 설정하려면:

<p class="font-stretch-[66.66%] ...">  <!-- ... --></p>

CSS 변수를 사용하려면 font-stretch-(<custom-property>) 구문을 사용할 수도 있습니다:

<p class="font-stretch-(--my-font-width) ...">  <!-- ... --></p>

이는 font-stretch-[var(<custom-property>)] 의 단축 표현으로, 자동으로 var() 함수를 추가해 줍니다.

반응형 디자인

접두사 a font-stretch 유틸리티 md:와 같은 브레이크포인트 변형과 함께 사용하면 medium 화면 크기 이상에서만 유틸리티가 적용됩니다:

<div class="font-stretch-normal md:font-stretch-expanded ...">  <!-- ... --></div>

변형 사용에 대해 더 알아보려면 변형 문서를 참고하세요.

Copyright © 2025 Tailwind Labs Inc.·Trademark Policy