문서의 선택한 두 판 사이의 차이를 보여줍니다.
| 양쪽 이전 판 이전 판 다음 판 | 이전 판 | ||
|
wiki:css:css_note:css_display [2021/03/15 11:23] emblim98 |
wiki:css:css_note:css_display [2023/01/13 18:44] (현재) |
||
|---|---|---|---|
| 줄 21: | 줄 21: | ||
| 블록 레벨 요소는 항상 새로운 줄에서 시작하고 사용 가능한 화면의 전체 너비를 차지합니다.\\ | 블록 레벨 요소는 항상 새로운 줄에서 시작하고 사용 가능한 화면의 전체 너비를 차지합니다.\\ | ||
| \\ | \\ | ||
| - | 블록 레벨 값을 가지는 요소들 | + | 블록 레벨 값을 가지는 요소들\\ |
| - | * < | + | * %%<div>%% |
| - | * <h1> ~ < | + | * %%<h1> ~ <h6>%% |
| - | * <p> | + | * %%<p>%% |
| - | * < | + | * %%< |
| - | * < | + | * %%< |
| - | * < | + | * %%< |
| - | * < | + | * %%< |
| \\ | \\ | ||
| ======Inline Elements====== | ======Inline Elements====== | ||
| 줄 198: | 줄 198: | ||
| </ | </ | ||
| </ | </ | ||
| - | | + | \\ |
| + | ====More Examples==== | ||
| + | <code html> | ||
| + | < | ||
| + | < | ||
| + | < | ||
| + | < | ||
| + | .imgbox { | ||
| + | float: left; | ||
| + | text-align: center; | ||
| + | width: 120px; | ||
| + | border: 1px solid gray; | ||
| + | margin: 4px; | ||
| + | padding: 6px; | ||
| + | } | ||
| + | |||
| + | button { | ||
| + | width: 100%; | ||
| + | } | ||
| + | </ | ||
| + | </ | ||
| + | < | ||
| + | |||
| + | < | ||
| + | < | ||
| + | < | ||
| + | |||
| + | <div class=" | ||
| + | <img src=" | ||
| + | <button onclick=" | ||
| + | </ | ||
| + | |||
| + | <div class=" | ||
| + | <img src=" | ||
| + | <button onclick=" | ||
| + | </ | ||
| + | |||
| + | <div class=" | ||
| + | <img src=" | ||
| + | <button onclick=" | ||
| + | </ | ||
| + | |||
| + | < | ||
| + | function removeElement() { | ||
| + | document.getElementById(" | ||
| + | } | ||
| + | |||
| + | function changeVisibility() { | ||
| + | document.getElementById(" | ||
| + | } | ||
| + | |||
| + | function resetElement() { | ||
| + | document.getElementById(" | ||
| + | document.getElementById(" | ||
| + | } | ||
| + | </ | ||
| + | |||
| + | </ | ||
| + | </ | ||
| + | |||
| + | </ | ||
| + | \\ | ||
| + | <code html> | ||
| + | < | ||
| + | < | ||
| + | |||
| + | < | ||
| + | < | ||
| + | #panel, | ||
| + | .flip { | ||
| + | font-size: 16px; | ||
| + | padding: 10px; | ||
| + | text-align: center; | ||
| + | background-color: | ||
| + | color: white; | ||
| + | border: solid 1px #a6d8a8; | ||
| + | margin: auto; | ||
| + | } | ||
| + | |||
| + | #panel { | ||
| + | display: none; | ||
| + | } | ||
| + | </ | ||
| + | </ | ||
| + | |||
| + | < | ||
| + | |||
| + | <p class=" | ||
| + | |||
| + | <div id=" | ||
| + | < | ||
| + | <p>It is styled with CSS and we use JavaScript to show it (display: block).</ | ||
| + | < | ||
| + | user clicks on the p element, a function called myFunction() is executed, which changes the style of the div | ||
| + | with id=" | ||
| + | < | ||
| + | </ | ||
| + | |||
| + | < | ||
| + | function myFunction() { | ||
| + | document.getElementById(" | ||
| + | } | ||
| + | </ | ||
| + | |||
| + | </ | ||
| + | |||
| + | </ | ||
| + | </ | ||
| + | \\ | ||
| + | ====CSS Display/ | ||
| + | ^ Property | ||
| + | | display | ||
| + | | visibility | ||
| + | |||
| {{tag> | {{tag> | ||