gpt4 book ai didi

css - iOS 移动设备中自动忽略最小高度

转载 作者:技术小花猫 更新时间:2023-10-29 11:17:05 25 4
gpt4 key购买 nike

我将一些列表项设置为 min-height: 12em - 用于桌面

当为平板电脑/手机屏幕缩小尺寸时,我想将其重置为:min-height: auto

但是 iPad/iPhone 忽略了这一点并保持 12em

我还设置了height: auto

最佳答案

使用以下代码:

/* Desktop */
.listings.default li {
min-height: 12em;
}

/* Between Desktop and Tablet */
@media only screen and (max-width: 1200px) and (min-width: 768px) {
.listings.default li {
display: list-item;
min-height: inherit;
}
}

所以使用inherit代替auto

我在我的 iPhone 上测试了这个,但使用了另一个媒体查询..检查this post查看标准设备的一些媒体查询..

关于css - iOS 移动设备中自动忽略最小高度,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/16167809/

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