CSS overflow-y를 사용하면 콘텐츠의 상단 하단 가장자리로 무엇을 할지 결정할 수 있습니다. overflow-y 속성을 구현하기 위해 다음 코드를 실행할 수 있습니다 -
예시
<!DOCTYPE html>
<html>
<head>
<style>
div {
background-color: orange;
width: 250px;
height: 45px;
border: 2px solid blue;
overflow-x: hidden;
overflow-y: scroll;
}
</style>
</head>
<body>
<h1>Heading</h1>
<div>Overflow property used here. This is a demo text to show the working of CSS overflow-x and overflow-y.</div>
</body>
</html> 출력
