iOS系统中使用框架集出错的解决办法

1、使用iframe标签;
2、在iframe标签外包裹div标签(这个div将作为支持内部滚动的基础容器。),如下:

<div  class=”top”>…</div>
<div  class=”main”>
	<div  class=”left”>…</div>
	<div class="right">
		<iframe name="mainFrame" src="fenlei.asp" style="width: 100%; height: 100%;" frameborder="0"></iframe>
	</div>
</div>
<div  class=”bottom”>…</div>

3、css样式:

.top { position: fixed; top: 0; width: 100%; height: 73px; z-index: 2; }
.bottom { position: fixed; bottom: 0; width: 100%; height: 47px; z-index: 2; }
.main { position: fixed; left: 0; top: 73px; bottom: 47px; width: 100%; }
.left { position: fixed; left: 0; top: 73px; bottom: 47px; width: 20%; -webkit-overflow-scrolling: touch; overflow: auto; }
.right { 
	width: 80%;
	height: 100%; 
	float: right; 
	-webkit-overflow-scrolling: touch; 		//使滚动条在iOS系统中滚动更顺畅
	overflow: auto;							//如果内容有溢出,则框架会显示滚动条以便查看其余的内容。
 }

猜你喜欢

转载自blog.csdn.net/qq_38882327/article/details/89011532
今日推荐