Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CSS

media query min and max width for all devices


@media only screen and (max-width: 480px) and (min-width: 320px)  {
  /* mobile-devices */
    .width {
    background: var(--clr-grey);
  }
}

@media only screen and (max-width: 768px) and (min-width: 481px)  {
  /* iPads, Tablets */
    .width {
    background: var(--clr-pink);
  }
}

@media only screen and (max-width: 1024px) and (min-width: 769px)  {
  /* small screens, laptops */
    .width {
    background: var(--clr-yellow);
  }
}

@media only screen and (min-width: 1024px)  {
  /* Desktops, large screens */
    .width {
    background: var(--clr-yellow);
  }
}
Source by www.emailonacid.com #
 
PREVIOUS NEXT
Tagged: #media #query #min #max #width #devices
ADD COMMENT
Topic
Name
9+1 =