|
|
发表于 2018-2-21 20:05:18
|
显示全部楼层
<!DOCTYPE html>
<html style="width: 100%;height: 100%;">
<head lang="en">
<meta charset="UTF-8">
<title>hostloc 镜像站,MJJ论坛 205205.xyz 镜像站 全网第一家</title>
<style>
html,body{ padding: 0; margin: 0;}
</style>
</head>
<body style="width: 100%;height: 100%;">
<div class="test" id="test" style="width: 100%;height: 100%;">
<iframe name="ifr" id="ifr" src="http://www.205205.xyz" frameborder="none" scrolling="auto" style="width: 100%; height: 100%;-webkit-transform:rotateY(180deg);"></iframe>
</div>
<script>
function test(h){
document.getElementById("test").style.height = h+"px"
}
//在父级操作容器高度,这有个问题就是在iframe中的页面有高度改变的时候这里并不会改变
/*document.getElementById("ifr").onload = function(){
document.getElementById("test").style.height = this.contentWindow.document.body.clientHeight+"px";
};*/
</script>
</body>
</html> |
|