工作,学习,生活,这里将会有一些记录. 备用域名:http://meisw.wdlinux.cn 注册 | 登陆

iframe全屏自适应

<html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>iframe全屏测试</title>
<mce:style><!--
body { margin: 0px;  }
iframe {border: 0px;}
--></mce:style><style mce_bogus="1">body { margin: 0px;  }
iframe {border: 0px;}</style>
</head>
<mce:script type="text/javascript"><!--
  function resize(){
   document.getElementById('frame3d').style.height = document.body.clientHeight - 84+"px";
  }
  window.onresize = resize;
  
// --></mce:script>
<body scroll="no">
<img border="0" width="100%" height="84" src="./images/logo.png" mce_src="images/logo.png">
<iframe id="frame3d" name="frame3d" frameborder="0" width="100%" scrolling="auto"
 style="margin-top: -4px;" onload="this.style.height=document.body.clientHeight-84"
 height="100%" src="./map.jsp" mce_src="map.jsp"></iframe>
</body>
</html>

 

http://www.cnblogs.com/whisht/archive/2011/04/18/2251817.html

« 上一篇 | 下一篇 »

Trackbacks

点击获得Trackback地址,Encode: UTF-8

发表评论

评论内容 (必填):