CSS 데모: overflow-x 데모 버튼을 클릭해 보세요!
selector {
    overflow-x: visible | hidden | clip | scroll | auto
}
/* 키워드 값 */
overflow-x: visible;
overflow-x: hidden;
overflow-x: clip;
overflow-x: scroll;
overflow-x: auto;

/* 전역 값 */
overflow-x: inherit;
overflow-x: initial;
overflow-x: revert;
overflow-x: revert-layer;
overflow-x: unset;
<p>
    ABCDEFGHIJKLMNOPQRSTUVWXYZ
</p>
p {
    overflow-x: visible;
    width: 100px;
    padding: 20px;
    border: 3px dashed #663399;
    background: rgba(255, 0, 200, .15);
}
실제 적용된 모습
box model
<p>
    ABCDEFGHIJKLMNOPQRSTUVWXYZ
</p>
p {
    overflow-x: hidden;
    width: 100px;
    padding: 20px;
    border: 3px dashed #663399;
    background: rgba(255, 0, 200, .15);
}
실제 적용된 모습
<p>
    ABCDEFGHIJKLMNOPQRSTUVWXYZ
</p>
p {
    overflow-x: clip;
    width: 100px;
    padding: 20px;
    border: 3px dashed #663399;
    background: rgba(255, 0, 200, .15);
}
실제 적용된 모습
<p>
    ABCDEFGHIJKLMNOPQRSTUVWXYZ
</p>
<p>
    ABC
</p>
p {
    overflow-x: scroll;
    width: 100px;
    padding: 20px;
    border: 3px dashed #663399;
    background: rgba(255, 0, 200, .15);
}
실제 적용된 모습
<p>
    ABCDEFGHIJKLMNOPQRSTUVWXYZ
</p>
<p>
    ABC
</p>
p {
    overflow-x: auto;
    width: 100px;
    padding: 20px;
    border: 3px dashed #663399;
    background: rgba(255, 0, 200, .15);
}
실제 적용된 모습
/*
 * overflow-x와 overflow-y를 지정한 두 키워드의 값이 서로 다르고,
 * - 순서와 관계없이 visible과 clip 두 값이 함께 사용되지 않아야 합니다.
 * - 둘 중 하나의 visible은 auto로 계산
 * - 둘 중 하나의 clip은 hidden으로 계산
 */


/* overflow-x: visible
   overflow-y: hidden
*/
overflow-x: visible; /* 재계산 => auto */
overflow-y: hidden;

/* overflow-x: visible
   overflow-y: auto
*/
overflow-x: visible; /* 재계산 => auto */
overflow-y: auto;

/* overflow-x: visible
   overflow-y: scroll
*/
overflow-x: visible; /* 재계산 => auto */
overflow-y: scroll;


/**************************************/


/* overflow-x: hidden
   overflow-y: visible
*/
overflow-x: hidden;
overflow-y: visible; /* 재계산 => auto */

/* overflow-x: hidden
   overflow-y: clip
*/
overflow-x: hidden;
overflow-y: clip; /* 재계산 => hidden */


/**************************************/


/* overflow-x: clip
   overflow-y: hidden
*/
overflow-x: clip; /* 재계산 => hidden */
overflow-y: hidden;

/* overflow-x: clip
   overflow-y: auto
*/
overflow-x: clip; /* 재계산 => hidden */
overflow-y: auto;

/* overflow-x: clip
   overflow-y: scroll
*/
overflow-x: clip; /* 재계산 => hidden */
overflow-y: scroll;


/**************************************/


/* overflow-x: auto
   overflow-y: visible
*/
overflow-x: auto;
overflow-y: visible; /* 재계산 => auto */

/* overflow-x: auto
   overflow-y: clip
*/
overflow-x: auto;
overflow-y: clip; /* 재계산 => hidden */


/**************************************/


/* overflow-x: scroll
   overflow-y: visible
*/
overflow-x: scroll;
overflow-y: visible; /* 재계산 => auto */

/* overflow-x: scroll
   overflow-y: clip
*/
overflow-x: scroll;
overflow-y: clip; /* 재계산 => hidden */
<p>
    ABCDEFGHIJKLMNOPQRSTUVWXYZ
</p>
p {
    overflow-y: auto; /* overflow-x를 지정하지 않으면
                         초깃값인 visible이 적용됩니다. */
    width: 100px;
    padding: 20px;
    border: 3px dashed #663399;
    background: rgba(255, 0, 200, .15);
}
실제 적용된 모습
overflow-x: visible; /* 재계산 => auto */
overflow-y: auto;