【发布时间】:2015-08-09 22:18:58
【问题描述】:
我正在使用 phonegap 开发应用程序。我已经制作了与 320 x 480 分辨率屏幕兼容的应用程序。现在我正在使用媒体查询使其与 480 x 800 屏幕以及更高分辨率的屏幕兼容,如下所示
<meta name="viewport" content="width=device-width, initial-scale=1">
<!-- style1 -->
<link rel="stylesheet" media="only screen and (min-width: 200px) and (max-width: 320px) and (orientation: portrait)" href="style.css">
<!-- style2 -->
<link rel="stylesheet" media="only screen and (min-width: 321px) and (max-width: 480px) and (orientation: portrait)" href="style2.css">
<!-- style3 -->
<link rel="stylesheet" media="only screen and (min-width: 481px) and (max-width: 1024px) and (orientation: portrait)" href="medium-style.css">
现在的问题是,当我在 480x 800 分辨率屏幕上运行应用程序时,它不是使用 style2,而是使用 style1。我还尝试使用单个样式表并删除视口。我也找不到任何与 phonegap 相关的文档媒体查询。请帮助
【问题讨论】:
标签: android cordova media-queries