我一直在使用 Apple 的 Xcode 工具(iOS 模拟器)对 iPad View 进行编码。我无法在 iPad Retina 设备上定位横向 View 。 我一直在尝试以下媒体查询...
@media only screen and (min-device-width : 768px) and (max-device-width
: 1024px) and (orientation : landscape) and ( -webkit-min-device-
pixel-ratio: 2){ //style goes here// }
@media only screen and (min-device-width : 1536px) and (max-device-width
: 2048px) and (orientation : landscape) and ( -webkit-min-device-
pixel-ratio: 2){ //style goes here// }
我找不到任何其他方法来定位 iPad Retina 中的横向 View 。我什至在 CSS 文件的不同部分尝试过这段代码,但仍然一无所获。
最佳答案
第一个是正确的,我使用相同的媒体查询并且在真实设备上工作。 也许您忘记包含元视口(viewport)?
关于ios - iPad Retina Display 特定的媒体查询,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/21406369/