2016-02-18 62 views
-1

我可以結合以下媒體查詢到1什麼,我們使用平板電腦和移動設備:結合媒體查詢選擇了平板電腦和移動到一個

@media only screen and (min-width: 702px) and (max-width: 1040px) { 
    .ipad-iframe-container .resize { 
     overflow: scroll; 
     -webkit-overflow-scrolling: touch; 
    } 
} 

@media only screen and (max-width: 701px) { 
    .ipad-iframe-container .resize { 
     overflow: scroll; 
     -webkit-overflow-scrolling: touch; 
    }  
} 
+0

'@media only screen and(max-width:1040px)'? – Hatchet

回答

2

是?

一切都是一樣的,除了寬度。一種701像素及以下,另一種爲702像素至1040像素。實際上,您可以將規則更改爲1040像素及以下。

我假設701和702之間的任何假想的子像素屏幕尺寸也被允許使用這個規則。 ;)

@media only screen and (max-width: 1040px) { 
    .ipad-iframe-container .resize { 
     overflow: scroll; 
     -webkit-overflow-scrolling: touch; 
    } 
} 
+0

我會這麼說。無論最小寬度是多少,它們都屬於第一個媒體查詢的最大寬度的範圍。 – gabe3886

相關問題