테스트 사이트 - 개발 중인 베타 버전입니다

CSS Overflow auto

· 8년 전 · 1879

CSS Overflow auto

 

 

 

auto값과 비슷 scroll필요한 경우에만 스크롤 막대를 추가 :

 

레이아웃을보다 잘 제어하고 싶을 때 overflow 속성을 사용할 수 있습니다. overflow 속성은 내용이 요소의 상자를 오버플로하면 어떻게되는지 지정합니다.

 

div {

    overflow: auto;

}

 

<!DOCTYPE html>

<html>

<head>

<style>

div {

    background-color: #eee;

    width: 200px;

    height: 50px;

    border: 1px dotted black;

    overflow: auto;

}

</style>

</head>

<body>

 

<h2>CSS Overflow</h2>

<p>The auto value is similar to scroll, only it add scrollbars when necessary:</p>

 

<div>You can use the overflow property when you want to have better control of the layout. The overflow property specifies what happens if content overflows an element's box.</div>

 

</body>

</html>


댓글 작성

댓글을 작성하시려면 로그인이 필요합니다.

로그인하기

게시글 목록

번호 제목
3229
3228
3227
3226
3225
3224
3223
3222
3221
3220
3219
3218
3217
3216
3215
3214
3213
3212
3211
3210
3209
3208
3207
3206
3205
3204
3203
3202
3201
3200