我使用了以下媒体查询CSS代码,但在iPad Pro 12.9中它不能以某种方式工作。以下是代码:
/* Landscape */
@media only screen
and (min-device-width : 1024px)
and (max-device-width : 1366px)
and (orientation : landscape) {
}
/* Landscape */
@media only screen
and (min-device-width: 1024px)
and (max-device-width: 1366px)
and (orientation: landscape)
and (-webkit-min-device-pixel-ratio: 1.5) {
}
/* Landscape */
@media only screen and (min-device-width: 1366px)
and (max-device-height: 1024px)
and (-webkit-min-device-pixel-ratio: 2)
and (orientation: landscape) {
}
我已经提到了以下解决方案,但不知何故它对我不起作用。
有人可以帮我在这里使这款iPad Pro 12.9英寸有效吗?
答案 0 :(得分:0)
试试这个
/* Portrait */
@media only screen
and (min-device-width: 1024px)
and (max-device-width: 1366px)
and (orientation: portrait)
and (-webkit-min-device-pixel-ratio: 1.5) {
}
/* Landscape */
@media only screen
and (min-device-width: 1024px)
and (max-device-width: 1366px)
and (orientation: landscape)
and (-webkit-min-device-pixel-ratio: 1.5) {
}