반응형


  1. CSS @media 사용
<meta name="viewport" content="width=device-width, initial-scale=1.0">

<body>
    <div class="container">
        <div class="item">A</div>
        <div class="item">B</div>
        <div class="item">C</div>
        <div class="item">D</div>
        <div class="item">E</div>
        <div class="item">F</div>
        <div class="item">G</div>
    </div>
@media ( max-width: 768px ) {
    .container{ color: red }	
  }

예시

Untitled

Untitled

미디어 쿼리