Back to CSS

CSS Tutorial

Media Queries

Apply different styles at different screen sizes.

Media queries let you change layout and styling based on viewport width.

They are commonly used to create mobile, tablet, and desktop layouts.

css
@media (max-width: 768px) {
  .cards {
    grid-template-columns: 1fr;
  }
}