문서의 선택한 두 판 사이의 차이를 보여줍니다.
| 다음 판 | 이전 판 | ||
|
wiki:css:css_note:css_overflow [2021/03/15 14:14] emblim98 만듦 |
wiki:css:css_note:css_overflow [2023/01/13 18:44] (현재) |
||
|---|---|---|---|
| 줄 77: | 줄 77: | ||
| **Note: | **Note: | ||
| \\ | \\ | ||
| - | **Note: | + | **Note: |
| - | * lastupdate | + | |
| - | </ | + | |
| - | <WRAP clear></ | + | |
| \\ | \\ | ||
| + | =====overflow: | ||
| + | overflow의 기본 값은 '' | ||
| + | ====예제==== | ||
| + | <code html> | ||
| + | < | ||
| + | <html lang=" | ||
| + | |||
| + | < | ||
| + | <meta charset=" | ||
| + | <meta http-equiv=" | ||
| + | <meta name=" | ||
| + | < | ||
| + | < | ||
| + | div { | ||
| + | background-color: | ||
| + | width: 200px; | ||
| + | height: 50px; | ||
| + | border: 1px solid black; | ||
| + | overflow: visible; | ||
| + | } | ||
| + | </ | ||
| + | </ | ||
| + | |||
| + | < | ||
| + | |||
| + | < | ||
| + | <p> | ||
| + | By default, the overflow is visible, meaning that it is not clipped and it renders outside the element' | ||
| + | </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' | ||
| + | </ | ||
| + | |||
| + | </ | ||
| + | |||
| + | </ | ||
| + | </ | ||
| \\ | \\ | ||
| - | =====Source of the article==== | + | \\ |
| - | * [[https://www.w3schools.com/css/css_overflow.asp|CSS Layout - Overflow]] | + | =====Overflow: hidden===== |
| + | '' | ||
| + | ====예제==== | ||
| + | <code html> | ||
| + | < | ||
| + | <html lang=" | ||
| + | |||
| + | < | ||
| + | <meta charset=" | ||
| + | <meta http-equiv=" | ||
| + | <meta name=" | ||
| + | < | ||
| + | < | ||
| + | div { | ||
| + | background-color: | ||
| + | width: 200px; | ||
| + | height: 50px; | ||
| + | border: 2px dotted black; | ||
| + | overflow: hidden; | ||
| + | } | ||
| + | </style> | ||
| + | </ | ||
| + | |||
| + | < | ||
| + | |||
| + | < | ||
| + | <p> | ||
| + | With th hidden value, the overflow is clipped, and the rest of the content is hidden: | ||
| + | </ | ||
| + | < | ||
| + | |||
| + | < | ||
| + | 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' | ||
| + | </div> | ||
| + | |||
| + | </body> | ||
| + | |||
| + | </ | ||
| + | </ | ||
| \\ | \\ | ||
| \\ | \\ | ||
| - | ======CSS Overflow====== | + | =====overflow: scroll===== |
| - | CSS '' | + | '' |
| ====예제==== | ====예제==== | ||
| <code html> | <code html> | ||
| 줄 98: | 줄 172: | ||
| <meta http-equiv=" | <meta http-equiv=" | ||
| <meta name=" | <meta name=" | ||
| - | < | + | < |
| < | < | ||
| - | | + | |
| - | background-color: | + | background-color: |
| - | color: white; | + | width: |
| - | padding: 15px; | + | |
| - | width: | + | |
| height: 100px; | height: 100px; | ||
| - | border: | + | border: |
| - | overflow: scroll; /* 스크롤 막대를 생성한다.*/ | + | overflow: scroll; |
| - | } | + | |
| - | + | ||
| - | # | + | |
| - | color: black; | + | |
| } | } | ||
| </ | </ | ||
| 줄 120: | 줄 188: | ||
| < | < | ||
| <p> | <p> | ||
| - | | + | |
| + | Note that this will add a scrollbar both horizontally and vertically (even if you do not need it): | ||
| </p> | </p> | ||
| - | < | + | < |
| - | | + | |
| - | | + | |
| - | elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat. Ut wisi enim ad | + | |
| - | minim veniam, quis nostrud exerci tation ullamcorper suscipit lobortis nisl ut aliquip ex ea commodo consequat. | + | |
| - | Duis autem vel eum iriure dolor in hendrerit in vulputate velit esse molestie consequat, vel illum dolore eu | + | |
| - | feugiat nulla facilisis at vero eros et accumsan et iusto odio dignissim qui blandit praesent luptatum zzril | + | |
| - | delenit augue duis dolore te feugait nulla facilisi. Nam liber tempor cum soluta nobis eleifend option congue | + | |
| - | nihil imperdiet doming id quod mazim placerat facer possim assum. Typi non habent claritatem insitam; est usus | + | |
| - | legentis in iis qui facit eorum claritatem. | + | |
| </ | </ | ||
| 줄 141: | 줄 203: | ||
| \\ | \\ | ||
| \\ | \\ | ||
| - | =====CSS Overflow===== | + | =====overflow: auto===== |
| - | '' | + | '' |
| + | ====예제==== | ||
| + | <code html> | ||
| + | < | ||
| + | <html lang=" | ||
| + | |||
| + | < | ||
| + | <meta charset=" | ||
| + | <meta http-equiv=" | ||
| + | <meta name=" | ||
| + | < | ||
| + | < | ||
| + | div { | ||
| + | background-color: | ||
| + | width: 200px; | ||
| + | height: 50px; | ||
| + | border: 3px solid crimson; | ||
| + | overflow: auto; | ||
| + | } | ||
| + | </ | ||
| + | </ | ||
| + | |||
| + | < | ||
| + | |||
| + | < | ||
| + | <p> | ||
| + | The auto value is similar to scroll, only it adds scrollbars when necessary: | ||
| + | </ | ||
| + | |||
| + | < | ||
| + | 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' | ||
| + | </ | ||
| + | |||
| + | </ | ||
| + | |||
| + | </ | ||
| + | </ | ||
| \\ | \\ | ||
| - | '' | ||
| - | * %%'' | ||
| - | * %%'' | ||
| - | * %%'' | ||
| - | * %%'' | ||
| \\ | \\ | ||
| - | **Note:**'' | + | =====Overflow-x and overflow-y===== |
| + | '' | ||
| \\ | \\ | ||
| - | **Note: | + | '' |
| + | '' | ||
| + | ====예제==== | ||
| + | <code html> | ||
| + | < | ||
| + | <html lang=" | ||
| + | < | ||
| + | <meta charset=" | ||
| + | <meta http-equiv=" | ||
| + | <meta name=" | ||
| + | < | ||
| + | < | ||
| + | div# | ||
| + | background-color: | ||
| + | width: 200px; | ||
| + | height: 50px; | ||
| + | border: 2px dotted crimson; | ||
| + | overflow-x: scroll; | ||
| + | overflow-y: hidden; | ||
| + | } | ||
| - | ===== | + | div# |
| + | background-color: | ||
| + | width: 200px; | ||
| + | height: 50px; | ||
| + | border: 2px dotted blue; | ||
| + | overflow-x: hidden; | ||
| + | overflow-y: scroll; | ||
| + | } | ||
| + | </ | ||
| + | </ | ||
| + | |||
| + | < | ||
| + | |||
| + | < | ||
| + | < | ||
| + | < | ||
| + | < | ||
| + | < | ||
| + | < | ||
| + | <div id=" | ||
| + | You cna 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' | ||
| + | </ | ||
| + | < | ||
| + | < | ||
| + | <div id=" | ||
| + | You cna 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' | ||
| + | </ | ||
| + | |||
| + | </ | ||
| + | |||
| + | </ | ||
| + | </ | ||
| + | \\ | ||
| + | \\ | ||
| + | ====All CSS Overflow Properties==== | ||
| + | ^ Property | ||
| + | | overflow | ||
| + | | overflow-x | ||
| + | | overflow-y | ||
| | | ||
| {{tag> | {{tag> | ||