2013-05-27 22 views
0

我有個小問題:媒體功能,不起作用?

我做網站的版本iPhone 5

但是這個代碼:

@media screen and (max-devise-width:568px) and (device-aspect-ratio: 2730/1000) and (-webkit-min-device-pixel-ratio: 2){ 
} 

不工作,而這段代碼:

@media screen and (max-devise-width:568px) 

作品,但我想補充device-aspect-ratio-webkit-min-device-pixel-ratio

+2

max-'devise'-width:是否是拼寫錯誤? – fcalderan

+1

是的,對不起max-width:568px –

+0

您是否嘗試過'(device-aspect-ratio:2730/1000)'來查看它是否匹配任何東西? – cimmanon

回答

1

您有max-devise-width拼寫s - 它應該是device

(如果這是一個錯誤重新輸入你的代碼的StackOverflow,請不這樣做,!始終複製和粘貼您的實際代碼。)

0

這是我多麼正常看出,在定位iPhone5時寫入:

@media screen and (max-width:560px) and (device-aspect-ratio: 40/71) and (-webkit-min-device-pixel-ratio: 2) {}