gpt4 book ai didi

css - iPad Pro 12.9 的横向媒体查询不起作用

转载 作者:行者123 更新时间:2023-11-28 02:03:06 25 4
gpt4 key购买 nike

我使用了以下媒体查询 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) {
}

我引用了以下解决方案,但不知何故它对我不起作用。

有人可以帮我使这个对 12.9 英寸 iPad Pro 有效吗?

最佳答案

试试这个

/* 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) {

}

关于css - iPad Pro 12.9 的横向媒体查询不起作用,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/49195574/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com