iPhone XR的CSS媒体查询不起作用?

问题描述 投票:0回答:1

我正在使用Phonegap开发混合移动应用程序。

除了一个只存在于iPhone XR上的问题,一切都很好。

iPhone X或iPhone XS等上不存在此问题。

基本上,我的CSS媒体查询在iPhone XR上不起作用(它什么都不做)。

这就是我用于iPhone XR的内容:

/* iPhone XR */
@media only screen 
    and (min-device-width: 414px) 
    and (min-device-height: 896px) 
    and (-webkit-device-pixel-ratio: 2) 
    and (orientation: portrait) { 
    /* my styles goes here */



}

有什么东西我不知道为什么这个媒体查询在iphone xr上没有做任何事情?

有人可以就这个问题提出建议吗?

提前致谢。

编辑:

以下CSS媒体查询在iphone x和iphone xs max上运行正常:

    /* iphone x */
@media only screen 
    and (device-width : 375px) 
    and (device-height : 812px) 
    and (-webkit-device-pixel-ratio : 3) {


}
css iphone phonegap
1个回答
© www.soinside.com 2019 - 2024. All rights reserved.