我在母版页中使用 iframe。我有两个主页。用户进入后,将应用第二个母版页。所以第二个母版页有 iframe,我希望页脚显示在 iframe 下方。
iframe 的 CSS:
iframe
{ position:fixed; height: 100%; display:block; width:100%; border:none; }
html 是:
<div>
<iframe src="http://ch.tbe.taleo.net/CH10/" style="width:100%; height:100%; bottom="100%; frameborder="0";
allowfullscreen">
</iframe>
</div>
我的页脚:
<div>
<br/><br/>
<center style="font-size: small; font-family: Arial">
Please contact Human Resources with any additional questions or concerns via email a <br/>
</center>
</div>
问题是:页脚出现在内容上。不在底部
最佳答案
发生这种情况是因为您的 iframe 有一个固定位置
,然后页脚将转到页面顶部。
position:fixed
提取元素并留下由其他元素填充的空间。
两种解决方案:
一个 如果可以,最好将 iframe 设置为 position:relative
二 将页脚的 margin-top
设置为等于 iframe 的 height
。
关于asp.net - 如何把页脚放下,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/19600140/