@media only screen
and (min-device-width : 375px)
and (max-device-width : 667px) {
body {
background-color: blue;
}
}
This is the media query code for iphone.
Inside the <head> i have write
<meta name="viewport" content="width=device-width, initial-scale=1.0">