์ด๋ฒ ํฌ์คํ
์์๋ CSS๋ฅผ ์ด์ฉํด์ ์คํฌ๋กค๋ฐ๋ฅผ ์ค์ ํ๋ ๋ฐฉ๋ฒ์ ๋ํด์ ์์๋ณด๋๋ก ํ๊ฒ ์ต๋๋ค.
CSS ์์ฑ ์ค์ overflow ๋ผ๋ ์์ฑ์ด ์๋๋ฐ ์ด๋ ์์ ์ปจํ ํธ ๋ฐ์ค๋ณด๋ค ๋ง์ ์์ ์ปจํ ํธ๊ฐ ๋ค์ด๊ฐ ๊ฒฝ์ฐ์ ์ปจํ ํธ๊ฐ ์ด๋ป๊ฒ ๋ณด์ฌ์ ธ์ผ ํ๋์ง์ ๋ํด์ ์ค์ ํด์ฃผ๋ ์์ฑ์ ๋๋ค.
์ด ์์ฑ์ ๋ํ ์์ฑ๊ฐ์ ๋ค์๊ณผ ๊ฐ์ ๊ฐ๋ค์ด ์์ต๋๋ค.
Value | Description |
---|---|
visible | Allows the content to overflow the borders of its containing element. |
hidden | The content of the nested element is simply cut off at the border of the containing element and no scrollbars is visible. |
scroll | The size of the containing element does not change, but the scrollbars are added to allow the user to scroll to see the content. |
auto | The 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
'๐ป Programming > CSS' ์นดํ ๊ณ ๋ฆฌ์ ๋ค๋ฅธ ๊ธ
[CSS] 21. Positioning ( ํฌ์ง์ ๋, ์์น ) (0) | 2016.06.12 |
---|---|
[CSS] 20. Visibility ( ๊ฐ์์ฑ ) (0) | 2016.06.12 |
[CSS] 18. Dimension ( ๋์ด, ๋๋น, width, height ) (0) | 2016.06.12 |
[CSS] 17. Outlines ( ์ธ๊ณฝ์ , ์์๋ผ์ธ ) (0) | 2016.06.12 |
[CSS] 16. Cursor ( ๋ง์ฐ์ค ์ปค์ ๋ชจ์ ) (0) | 2016.06.12 |