padding-right
시도해보기
구문
/* <length> 값 */
padding-right: 0.5em;
padding-right: 0;
padding-right: 2cm;
/* <percentage> 값 */
padding-right: 10%;
/* 전역 값 */
padding-right: inherit;
padding-right: initial;
padding-right: unset;
padding-right
속성의 값은 아래 목록 중 하나로 지정할 수 있습니다. 바깥 여백margin과 다르게, 음수 값은 사용할 수 없습니다.
값
<length>
- 여백의 크기로 고정값 사용.
<percentage>
- 여백의 크기로 컨테이닝 블록 너비의 백분율 사용.
형식 구문
padding-right =
<length-percentage>
<length-percentage> =
<length> |
<percentage>
예제
.content { padding-right: 5%; }
.sidebox { padding-right: 10px; }
명세
Specification | Status | Comment |
---|---|---|
CSS Box Model The definition of 'padding-right' in that specification. |
Candidate Recommendation | No change. |
CSS Transitions The definition of 'padding-right' in that specification. |
Working Draft | Defines padding-right as animatable. |
CSS Level 2 (Revision 1) The definition of 'padding-right' in that specification. |
Recommendation | No change. |
CSS Level 1 The definition of 'padding-right' in that specification. |
Recommendation | Initial definition. |
초기값 | 0 |
---|---|
적용대상 | all elements, except table-row-group , table-header-group , table-footer-group , table-row , table-column-group and table-column . It also applies to ::first-letter (en-US) and ::first-line (en-US). |
상속 | no |
Percentages | refer to the width of the containing block |
Computed value | the percentage as specified or the absolute length |
Animation type | a length |
브라우저 호환성
BCD tables only load in the browser