/* #### iPhone Portrait or Landscape #### */
@media screen and (max-device-width: 320px) and (-webkit-min-device-pixel-ratio: 1.5){
/* some CSS here */
background-color:#e7e7e7;
/* #### Mobile Phones Portrait #### */
@media screen and (max-device-width: 320px) and (orientation: portrait){
/* some CSS here */
background-color:#ff0000;
}
/* #### Mobile Phones Landscape #### */
@media screen and (max-device-width: 640px) and (orientation: landscape){
/* some CSS here */
background-color:#000000;
}
/* #### Tablets Portrait or Landscape #### */
@media screen and (min-device-width: 768px) and (max-device-width: 1024px){
/* some CSS here */
background-color:#fffffff;
}
body {
height:350px;
width:350px;
background-color: #000;
}
@media screen and (min-width: 320px)and (max-width: 900px)
{
body {
background-color: #e7e7e7;
}
}
ใน media queries ต้องกำหนดว่าต้องการเปลี่ยน class หรือ tag ไหนด้วยคะ
@media screen and (min-width: 320px)and (max-width: 900px)
{ body {
background-color: #e7e7e7;
}
}