728x90
반응형
레이아웃04
이번 레이아웃은 전체 영역이 들어간 구조이다.
실제 사이트에서 이런 구조를 많이 사용하며, 컨테이너를 만들어서 가운데 영역을 설정.
float을 이용한 레이아웃 이다.
레이아웃을 이용한
* {
margin: 0;
padding: 0;
}
#body{
}
#header {
height: 100px;
background-color: #E0F2F1;
}
#nav {
height: 300px;
background-color: #80CBC4;
}
#section {
height: 580px;
background-color: #26A69A;
}
#footer {
height: 100px;
background-color: #00897B;
}
/* 아이디/클래스
#/.
한번/두개 이상/중복도 가능
전체적인 틀, 스크립트 --> id
세부적인 영역, 반복 --> class
*/
.container {
width:1200px;
height: inherit;
margin: 0 auto;
background-color: rgba(0,0,0,0.3);
}
@media (max-width: 1220px){
.container {
width: 96%;
}
}
@media (max-width:768px){
.container {
width: 100%;
}
}
See the Pen f by 이유나 (@fkdldhs8484) on CodePen.
728x90
댓글