移动H5问题-iframe下面有白边

1.iframe的处理,vertical-align:bottom;可以防止iframe下面产生白边

<div id="mian" style="overflow: auto;-webkit-overflow-scrolling:touch;width:100%;height: 100%;">

<iframe id="4_iframe" src="***.html" frameborder="no" border="0" scrolling="no" style="width: 1px; min-width: 100%; *width: 100%; height: 100%;vertical-align:bottom;"></iframe>

</div>

其他移动端:iframe使用样式width: 100%; height: 100%;vertical-align:bottom;

IOS端:iframe使用样式width: 1px; min-width: 100%; *width: 100%; height: 100%;vertical-align:bottom;

2.div使用类似如下样式产生下面白边

<header style="position: absolute;height: 3.5em;font-size: 14px;"></header>
<div style="overflow: auto;position: absolute;width: 100%;height: 100%;top: 3.5em;font-size: 16px;">
...
</div>

header和div的font-size不一致,使em产生的高度不一致导致白边

猜你喜欢

转载自blog.csdn.net/csdn_zuirenxiao/article/details/105988931