首页 > 其他 > 详细

iframe自适应当前页面高度

时间:2016-08-21 18:28:30      阅读:103      评论:0      收藏:0      [点我收藏+]
<style type="text/css">
    *{margin:0;padding:0;list-style-type:none;}
</style>

 


<
script type="text/javascript"> $(document).ready(function(){ var iframeHeight = function () { var _height = $(window).height() - 34; $(#content).height(_height); } window.onresize = iframeHeight; $(function () { iframeHeight(); }); }); </script> <div id="container" style="overflow:hidden;"> <iframe border="0" id="content" src="http://www.17sucai.com/preview/423685/2016-07-13/404/index.html" frameborder="0" height="100%" width="100%"></iframe> </div>

 

iframe自适应当前页面高度

原文:http://www.cnblogs.com/webapi/p/5793052.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!