2013-04-23 33 views
6

我有些列表项设置为min-height: 12em - 桌面最小高度自动在iOS中忽略移动

当浆纱下来平板电脑/手机屏幕我想这个重置为:min-height: auto

不过的iPad/iPhone无视这一点,并保持12em

我还设置height: auto

+0

你是如何改变这种iOS设备的属性?它在Android上工作吗?没有更多的信息,这只是一个猜测游戏。 – 2013-04-23 11:10:56

+0

你是否在钛iphone开发? – 2013-04-23 11:11:01

+1

发布您的媒体查询CSS。 – 2013-04-23 11:11:29

回答

10

使用下面的代码:

/* 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看到一些标准设备的媒体查询的..

+0

谢谢你的 - 完美的作品:-) – topiman 2013-04-23 12:26:20

+0

工程就像一个魅力。谢谢!!! – 2017-12-01 11:04:15