我想建立一個簡單的HTML測試,其中iframe覆蓋主要HTML的元素,所以它不會被看到。 我將iframe配置爲100%的高度和寬度,但好像主HTML仍在查看頁面內的元素。上面的iframe主要的html
這是主要的HTML:
<HTML>
<HEAD>
<style>
html, body, iframe {
margin:0; /* remove any margins of the IFrame and the body tag */
padding:0;
height:100%; /* set height 100% so that it fills the entire view port*/
}
.iframe {
height: 100%;
width: 100%;
}
.main {
height: 100%;
width: 100%;
position:absolute;
z-index:10000000;
}
</style>
</HEAD>
<BODY>
<div class=main>
<iframe src="iframe.html" width=100% height=100%></iframe>
</div>
<p>Test is after the iframe</p>
</body>
</HTML>
我想對於不出現,因爲它應該是需要的頁面的100%的iframe下的「測試是在iframe後」的文字。
我已經添加了位置和z索引iframe的CSS,它仍然無法正常工作 – nimi
可能爲我們提供了一個鏈接,這將幫助我們調試什麼繼續。 –
你可以在這裏試試:http://disha.besaba.com/test/main.html – nimi