CSS overflow-y 속성
예시
다른 overflow-y 속성 값 표시:
div.ex1 {
overflow-y: scroll;
}
div.ex2 {
overflow-y: hidden;
}
div.ex3 {
overflow-y:
auto;
}
div.ex4 {
overflow-y: visible;
}
정의 및 사용
이 overflow-y
속성은 블록 수준 요소가 상단 및 하단 가장자리에서 오버플로될 때 콘텐츠를 자르거나 스크롤 막대를 추가하거나 오버플로 콘텐츠를 표시할지 여부를 지정합니다.
팁: overflow-x 속성을 사용 하여 왼쪽 및 오른쪽 가장자리의 클리핑을 결정합니다.
브라우저 지원
표의 숫자는 속성을 완전히 지원하는 첫 번째 브라우저 버전을 지정합니다.
-ms- 뒤에 오는 숫자는 접두사와 함께 작동한 첫 번째 버전을 지정합니다.
Property | |||||
---|---|---|---|---|---|
overflow-y | 4.0 | 9.0 8.0 -ms- |
1.5 | 3.0 | 9.5 |
CSS 구문
overflow-y: visible|hidden|scroll|auto|initial|inherit;
속성 값
Value | Description | Play it |
---|---|---|
visible | The content is not clipped, and it may be rendered outside the content box. This is default | |
hidden | The content is clipped - and no scrolling mechanism is provided | |
scroll | The content is clipped and a scrolling mechanism is provided | |
auto | Should cause a scrolling mechanism to be provided for overflowing boxes | |
initial | Sets this property to its default value. Read about initial | |
inherit | Inherits this property from its parent element. Read about inherit |
관련 페이지
CSS 튜토리얼: CSS 오버플로
HTML DOM 참조: overflowY 속성