media query
@media only screen and (max-width: 600px) {
body {
background-color: lightblue;
}
}
media query
@media only screen and (max-width: 600px) {
body {
background-color: lightblue;
}
}
media query
// Example media query syntax
@media only screen and (min-width: 768px) {
.my-example-class {
padding: 50px;
}
}
// Best Practice
// keep default style for smallest screen size (portrait mobile, below 576px)
// and then proceed in assending order with media query like below
// Small devices (landscape phones, 576px and up)
@media (min-width: 576px) { ... }
// Medium devices (tablets, 768px and up)
@media (min-width: 768px) { ... }
// Large devices (desktops, 992px and up)
@media (min-width: 992px) { ... }
// so on ...
media query
// Extra small devices (portrait phones, less than 576px)
// No media query for `xs` since this is the default in Bootstrap
// Small devices (landscape phones, 576px and up)
@media (min-width: 576px) { ... }
// Medium devices (tablets, 768px and up)
@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) { ... }
media query
@media only screen and (min-device-width: 900px) and (max-device-width: 1200px) {
/* insert styles here */
}
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) {}
media query
@media only screen and (max-width: 600px) {
.class {
// Your CSS
}
}
media query
@media only screen and (max-width: 800px) {
body {
background-color: ; /*your color*/
}
}
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*/
media query
@media (max-height : 800px){ /* from 0 to 800 px max height applies */
p{
font-size:10px
}
}
media query
@media only screen and (max-width: 600px) {
body {
// Change size, placement of elements
}
}
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us