2011-10-26 63 views
1

似乎iPad規則覆蓋iPhone4相關規則。 我該如何解決這個問題?css3媒體查詢:iPad覆蓋iphone4(視網膜)規則

/* iPad */ 
@media only screen and (min-device-width: 768px) and (max-device-width: 1024px) and (orientation:portrait) { 
    #theDiv { width: 400px; } 
} 
@media only screen and (min-device-width: 768px) and (max-device-width: 1024px) and (orientation:landscape) { 
    #theDiv { width: 600px; }  
} 


/* iPhoneRetina */ 
@media only screen and (-webkit-min-device-pixel-ratio : 1.5), only screen and (min-device-pixel-ratio : 1.5) { 
    #theDiv { width: 200px; } 
} 
+0

您是否將視口設置爲width = device-width? – mddw

回答