2013-07-01 56 views
0

我面臨Ipad和Android平板電腦媒體查詢問題,特別是在橫向模式下。Ipad和Android平板電腦媒體查詢問題

我需要一些關於正確的媒體查詢的幫助。

這裏是我使用媒體查詢:

的Android景觀:

@media only screen and (min-device-width : 800px) and (max-device-width: 1280px) and (orientation : landscape) {} 

Ipad的景觀:

@media only screen and (min-device-width : 768px) and (max-device-width: 1024px) and (orientation : landscape) {} 
+0

我認爲'orientation'就足夠了。不需要'(min | max) - 設備寬度。 –

回答

0

使用

@media (min-width : 800px) and (max-width: 1280px) {} 
@media (min-width : 768px) and (max-width: 1024px) {} 

參考

/* Large desktop */ 
@media (min-width: 1200px) { ... } 

/* Portrait tablet to landscape and desktop */ 
@media (min-width: 768px) and (max-width: 979px) { ... } 

/* Landscape phone to portrait tablet */ 
@media (max-width: 767px) { ... } 

/* Landscape phones and down */ 
@media (max-width: 480px) { ... } 
0

這項工作的Android標籤:

@media(最小 - 設備寬度:600px的)和(MAX-設備寬度:1,024)和(方向:橫向){}

@media(最小 - 設備寬度:600px的)和(MAX-設備寬度:1,024)和(方向:縱向){}

相關問題