JqueryMobile分辨率工作大小

时间:2012-06-28 23:41:43

标签: jquery iphone jquery-mobile

您好我正在为企业创建移动网站。而且我想知道在编码我的标题和格式化时是否需要使用特定的分辨率大小。我通过Dreamweaver获得了两种不同的分辨率(目前仅针对iphone或类似的智能手机开发,没有平板电脑)。我得到了320x480和480x800,我应该有一个特定的尺寸吗?或者有没有办法让我的标题横幅和其他图像在一个区域内自行缩放。我希望这在大多数情况下都有意义!

1 个答案:

答案 0 :(得分: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 */
}