iframe 内容适用高度

HTML:css

<div class="content">
    <iframe id="frameObj" src="连接" frameborder="0"leftmargin="0"  topmargin="0" style="width: 100%;height: 100%;margin-top: 0; display: block;" ></iframe>
</div>

js:浏览器

var _height = $(window).height();
$(".content").css("height", _height+ "px");

想法:spa

获取浏览器的高度,以后把高度赋值给iframe外面的div,iframe的高度给百分之百code

相关文章
相关标签/搜索