2012-06-28 112 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 */ 
}