Answers for "add media query in css"

CSS
120

css media queries

@media only screen and (max-width: 1200px){
    /*Tablets [601px -> 1200px]*/
}
@media only screen and (max-width: 600px){
	/*Big smartphones [426px -> 600px]*/
}
@media only screen and (max-width: 425px){
	/*Small smartphones [325px -> 425px]*/
}
Posted by: Guest on July-04-2020
51

media query

@media only screen and (max-width: 600px) {
  body {
    background-color: lightblue;
  }
}
Posted by: Guest on December-06-2019
14

css media query

/* BOOSTRAP MEDIA BREAKPOINTS */
/* Small devices (landscape phones, 576px and up) */
@media (min-width: 576px) {  
  .selector {
  	background-color:#f00;
  }
}
/* Medium devices (tablets, 768px and up) The navbar toggle appears at this breakpoint */
@media (min-width: 768px) {}
/* Large devices (desktops, 992px and up) */
@media (min-width: 992px) {}
/* Extra large devices (large desktops, 1200px and up) */
@media (min-width: 1200px) {}
Posted by: Guest on May-16-2020
2

media query css

@media only screen and (max-width: 768px) { }
Posted by: Guest on August-11-2021
4

media query

/* Smartphones and larger (mobile-first) */

/* Tablet portrait and larger */
@media only screen and (min-width: 600px) {}
/* Tablet landscape and larger */
@media only screen and (min-width: 900px) {}
/* Desktop and larger */
@media only screen and (min-width: 1200px) {}
/* Big desktop (4k) */
@media only screen and (min-width: 2500px) {}
Posted by: Guest on June-07-2021
1

media query

@media screen and (min-width:480px) and (max-width:800px) {
    /* Target landscape smartphones, portrait tablets, narrow desktops
    */
  }

  @media screen and (max-width:479px) {
    /* Target portrait smartphones */
  }
  
  @media all and (orientation: landscape) {
    /* Target device in landscape mode */
  }
  @media all and (orientation: portrait) {
    /* Target device in portrait mode */
  }
 /*https://developers.google.com/search/blog/2012/04/responsive-design-harnessing-power-of*/
Posted by: Guest on June-19-2021

Browse Popular Code Answers by Language