문서의 선택한 두 판 사이의 차이를 보여줍니다.
양쪽 이전 판 이전 판 다음 판 | 이전 판 | ||
wiki:css:css_note:css_media_queries [2021/05/04 13:10] emblim98 [Example] |
wiki:css:css_note:css_media_queries [2023/01/13 18:44] (현재) |
||
---|---|---|---|
줄 84: | 줄 84: | ||
====Example==== | ====Example==== | ||
<code css> | <code css> | ||
+ | < | ||
+ | <html lang=" | ||
- | </code> | + | <head> |
- | + | < | |
- | =====CSS @media Reference===== | + | < |
+ | .wrapper { | ||
+ | overflow: auto; | ||
+ | } | ||
+ | #main { | ||
+ | margin-left: | ||
+ | } | ||
+ | # | ||
+ | float: none; | ||
+ | width: auto; | ||
+ | } | ||
+ | #menulist { | ||
+ | margin: 0; | ||
+ | padding: 0; | ||
+ | } | ||
+ | .menuitem { | ||
+ | background: #CDF0F6; | ||
+ | border: 1px solid #d4d4d4; | ||
+ | border-radius: | ||
+ | list-style-type: | ||
+ | margin: 4px; | ||
+ | padding: 2px; | ||
+ | } | ||
+ | @media screen and (min-width: 480px) { | ||
+ | # | ||
+ | /* 너비가 480px이 될 때 상단메뉴가 | ||
+ | width: 200px; | ||
+ | float: left; | ||
+ | } | ||
+ | #main { | ||
+ | margin-left: | ||
+ | } | ||
+ | } | ||
+ | </ | ||
+ | </ | ||
+ | < | ||
+ | <div class=" | ||
+ | <div id=" | ||
+ | <ul id=" | ||
+ | <li class=" | ||
+ | <li class=" | ||
+ | <li class=" | ||
+ | <li class=" | ||
+ | <li class=" | ||
+ | </ul> | ||
+ | </ | ||
+ | <div id=" | ||
+ | < | ||
+ | <p> | ||
+ | This example shows a menu that will float to the left of the page | ||
+ | if the view port is 480 pixels wide or wider. | ||
+ | If the viewport is less than 480 pixes, the menu will be on top of the content. | ||
+ | </p> | ||
+ | </ | ||
+ | </ | ||
+ | </ | ||
+ | </ | ||
+ | </ | ||
+ | =====CSS @media Reference===== | ||
+ | 모든 미디어 유형과 기능/ | ||