0

我在母版页中使用 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>

问题是:页脚出现在内容上。不在底部

4

1 回答 1

1

发生这种情况是因为您的 iframe 有一个fixed position然后页脚将转到页面顶部。

position:fixed提取元素并留下空间由其他元素填充。

两种解决方案:

一个如果可以的话,最好设置你的 iframeposition:relative

两个将 a 设置margin-top为您的页脚,等于height您的 iframe 的。

于 2013-10-25T22:07:39.663 回答