기타

반응형css

리양 2021. 7. 21. 10:53

https://www.w3schools.com/css/css_rwd_mediaqueries.asp

 

Responsive Web Design Media Queries

Responsive Web Design - Media Queries What is a Media Query? Media query is a CSS technique introduced in CSS3. It uses the @media rule to include a block of CSS properties only if a certain condition is true. Example If the browser window is 600px or smal

www.w3schools.com

 

[class*="col-"] {
  float: left;
  padding: 15px;
}

 

이런식으로 거터값을 준 다음에 

 

/* For desktop: */
.col-1 {width: 8.33%;}
.col-2 {width: 16.66%;}
.col-3 {width: 25%;}
.col-4 {width: 33.33%;}
.col-5 {width: 41.66%;}
.col-6 {width: 50%;}
.col-7 {width: 58.33%;}
.col-8 {width: 66.66%;}
.col-9 {width: 75%;}
.col-10 {width: 83.33%;}
.col-11 {width: 91.66%;}
.col-12 {width: 100%;}

 

12단을 나누어서 작업