iframe 移动端兼容

<div ng-if="showInvoice" style="overflow-y: scroll;-webkit-overflow-scrolling:touch;width:100%;height:200px;border: 1px solid #ccc;">
    <iframe src="http://m.kuaidi100.com/result.jsp?nu=604036789492546" frameborder="0" scrolling='no' style="min-width: 100%;width:100%;margin-top: -88px;height: 100%;margin-top: -150px;min-height:366px;">iframe>
div>

 

父级css

1 {
2      overflow-y: scroll;
3     -webkit-overflow-scrolling:touch;  
4 }

iframe

{
//铺满
min-width: 100%;
width:100%;
height: 100%;
//隐藏头部
margin-top: -150px;
//必须有最小高度不然移动端滑动时会向上滚动
min-height:366px;
}

 

转载于:https://www.cnblogs.com/yiyangl/p/10117851.html

你可能感兴趣的:(iframe 移动端兼容)