์ด๋ฒˆ ํฌ์ŠคํŒ…์—์„œ๋Š” CSS๋ฅผ ์ด์šฉํ•ด์„œ ์Šคํฌ๋กค๋ฐ”๋ฅผ ์„ค์ •ํ•˜๋Š” ๋ฐฉ๋ฒ•์— ๋Œ€ํ•ด์„œ ์•Œ์•„๋ณด๋„๋ก ํ•˜๊ฒ ์Šต๋‹ˆ๋‹ค.

 

CSS ์†์„ฑ ์ค‘์— overflow ๋ผ๋Š” ์†์„ฑ์ด ์žˆ๋Š”๋ฐ ์ด๋…€์„์€ ์ปจํ…ํŠธ ๋ฐ•์Šค๋ณด๋‹ค ๋งŽ์€ ์–‘์˜ ์ปจํ…ํŠธ๊ฐ€ ๋“ค์–ด๊ฐˆ ๊ฒฝ์šฐ์— ์ปจํ…ํŠธ๊ฐ€ ์–ด๋–ป๊ฒŒ ๋ณด์—ฌ์ ธ์•ผ ํ•˜๋Š”์ง€์— ๋Œ€ํ•ด์„œ ์„ค์ •ํ•ด์ฃผ๋Š” ์†์„ฑ์ž…๋‹ˆ๋‹ค.

 

์ด ์†์„ฑ์— ๋Œ€ํ•œ ์†์„ฑ๊ฐ’์€ ๋‹ค์Œ๊ณผ ๊ฐ™์€ ๊ฐ’๋“ค์ด ์žˆ์Šต๋‹ˆ๋‹ค. 

ValueDescription
visibleAllows the content to overflow the borders of its containing element.
hiddenThe content of the nested element is simply cut off at the border of the containing element and no scrollbars is visible.
scrollThe size of the containing element does not change, but the scrollbars are added to allow the user to scroll to see the content.
autoThe purpose is the same as scroll, but the scrollbar will be shown only if the content does overflow.

 

๋‹ค์Œ ์˜ˆ์ œ๋ฅผ ๋ณด์‹ค๊นŒ์š”. 

<style type="text/css">
.scroll{
 display:block;
 border: 1px solid red;
 padding:5px;
 margin-top:5px;
 width:300px;
 height:50px;
 overflow:scroll;
 }
.auto{
 display:block;
 border: 1px solid red;
 padding:5px;
 margin-top:5px;
 width:300px;
 height:50px;
 overflow:auto;
 }
</style>
<p>Example of scroll value:</p>
<div class="scroll">
I am going to keep lot of content here just to show
you how scrollbars works if there is an overflow in
an element box. This provides your horizontal as well
 as vertical scrollbars.
</div>
<br />
<p>Example of auto value:</p>
<div class="auto">
I am going to keep lot of content here just to show
you how scrollbars works if there is an overflow in
an element box. This provides your horizontal as well
as vertical scrollbars.
</div>

 

๊ฒฐ๊ณผ๋Š” ์•„๋ž˜์™€ ๊ฐ™์Šต๋‹ˆ๋‹ค. ( ๊ฒฐ๊ณผ ์ด๋ฏธ์ง€ )

 

 

 ์ง์ ‘ ํŽ˜์ด์ง€๋ฅผ ๋งŒ๋“ค์–ด์„œ ๊ตฌํ˜„ํ•ด๋ณด์„ธ์š”. ^-^ 

 

 

 

 

 

Reference : http://www.tutorialspoint.com/css/css_scrollbars.htm