2012-06-28 47 views
1

您好,我目前正在爲一個企業創建一個移動網站。我想知道如果編碼我的標題和格式,如果有特定的分辨率大小,我需要與之合作。我已經通過Dreamweaver獲得了兩種不同的解決方案(目前只爲iPhone或類似的智能手機開發,沒有平板電腦)。我被授予320x480和480x800,有我應該在工作的具體大小?或者有沒有辦法使我的標題橫幅和其他圖像在一個區域內自行縮放。我希望這在大部分情況下是合理的!JqueryMobile解決方案工作尺寸

回答

1

你可以使用CSS3 Media Queries

/* Smartphones (portrait and landscape) */ 
@media only screen 
and (min-device-width : 320px) 
and (max-device-width : 480px) { 
/* Styles */ 
} 

/* Smartphones (landscape) */ 
@media only screen 
and (min-width : 321px) { 
/* Styles */ 
} 

/* Smartphones (portrait) */ 
@media only screen 
and (max-width : 320px) { 
/* Styles */ 
} 

/* iPads (portrait and landscape) */ 
@media only screen 
and (min-device-width : 768px) 
and (max-device-width : 1024px) { 
/* Styles */ 
} 

/* iPads (landscape) */ 
@media only screen 
and (min-device-width : 768px) 
and (max-device-width : 1024px) 
and (orientation : landscape) { 
/* Styles */ 
}