Answers for "device-width"

CSS
0

device-width

body {
  background: white;    
}
 
@media screen and (min-width: 980px) /* Desktop */ {
  body {
    background: red;
  }
}
 
@media screen  and (max-width: 979px) /* Tablet */ {
  body {
    background: blue;
  }
}
 
@media screen and (max-width: 500px) /* Mobile */ {
  body {
    background: green;
  }
}
Posted by: Guest on August-25-2020

Browse Popular Code Answers by Language