[英]Fixed bottom footer inside iframe on mobile app
I need fixed bottom footer inside iframe. 我需要在iframe中固定底部页脚。 here i am using full height width iframe.
在这里,我正在使用全高宽度iframe。 So Right now i have a page iframe.html inside this file i am using index.html file here i have fixed footer.
所以现在我在此文件中有一个iframe.html页面,我在这里使用index.html文件,页脚固定。 It working fine web and android browser but it is not working iOS safari browser.
它可以在网络和Android浏览器上正常运行,但不能在iOS Safari浏览器上运行。
For this i am using position: fixed
property in footer. 为此,我使用
position: fixed
页脚中的position: fixed
属性。
iframe.html file iframe.html文件
<iframe src="index.html" id="iframe"></iframe>
iframe.html css file iframe.html CSS文件
iframe {
position:absolute;
top:0;
left:0;
width:100%;
overflow: hidden;
-webkit-overflow-scrolling:touch;
}
index.html file index.html文件
HTML code HTML代码
<script>
for(var i = 0; i < 100; i++)
document.write("<div> test :: " , i , "</div>");
</script>
<footer>
<p>footer</p>
</footer>
CSS Code CSS代码
footer {
position: fixed;
bottom: 0;
left: 0;
right: 0;
z-index: 100;
padiing: 0.5em;
}
The problem is with the position:fixed
which works somewhat differently in mobile browsers as compared to desktop. 问题在于
position:fixed
在移动浏览器中的工作方式与台式机相比有些不同。
I will suggest you to go through the following link 我建议您通过以下链接
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.