1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 | <!DOCTYPE html> <html lang="ko"> <head> <meta charset="utf-8"> <style> body, html, .wrapper { width: 100%; height: 100%; } .container { position: relative; box-sizing: border-box; padding-top: 50px; width: 100%; height: 100%; background: gray; } .topBox { position: absolute; left: 0; top: 0; width: 100%; height: 50px; background: skyblue; } .bottomBox { position: relative; width: 100%; height: 100%; background: orange; } </style> </head> <body> <div class="wrapper"> <div class="container"> <div class="topBox"></div> <div class="bottomBox"></div> </div> </div> </body> </html> |
반응형
'CSS' 카테고리의 다른 글
[CSS] 자바스크립트 click이벤트 없이 CSS만으로 toggle 구현하기 (0) | 2016.07.12 |
---|---|
[CSS] nth-child (n번째 부터 n번째 까지 css적용) (3) | 2016.07.05 |
[CSS] block 요소의 width값을 미리 알 수 없을 때 가운데 정렬 (0) | 2016.06.30 |
[CSS] 스크롤바 왼쪽에 위치하게 (0) | 2016.06.28 |
[CSS] 삼각형 만들기 (1) | 2016.06.22 |