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

CSS Overflow auto

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>


댓글 작성

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

로그인하기

게시글 목록

번호 제목
2922
2921
2920
2919
2918
2917
2915
2914
2913
2912
2910
2909
2908
2907
2906
2905
2903
2902
2901
2900
2899
2897
2896
2895
2892
2891
2890
2889
2873
2866