<length-percentage>

Baseline Widely available

This feature is well established and works across many devices and browser versions. It’s been available across browsers since July 2015.

<length-percentage> CSS 자료형<length> 또는 <percentage>인 값을 나타냅니다.

구문

<length><percentage> 문서에서 각 자료형의 구문을 살펴보세요.

calc()에서 사용하기

<length-percentage>를 허용한다면 백분율이 길이로 이행한다는 뜻이므로 calc()와 함께 사용할 수 있습니다. 따라서 아래의 width 값 모두 유효합니다.

css
width: 200px
width: 20%
width: calc(100% - 200px)

명세

Specification
CSS Values and Units Module Level 4
# mixed-percentages

브라우저 호환성

Report problems with this compatibility data on GitHub
desktopmobile
Chrome
Edge
Firefox
Opera
Safari
Chrome Android
Firefox for Android
Opera Android
Safari on iOS
Samsung Internet
WebView Android
WebView on iOS
<length-percentage>

Legend

Tip: you can click/tap on a cell for more information.

Full support
Full support