ThinkChat2.0新版上线,更智能更精彩,支持会话、画图、阅读、搜索等,送10W Token,即刻开启你的AI之旅 广告
[TOC] ## 代码 >注:如果不加这段JS代码的话,iframe显示的会不完整! ## HTML ``` <!--main/stat--> <div class="main-content"> <div class="page-content" id="content"> <iframe src="{:url('Main/index')}" style="width:100%;height: 100%;" frameborder="0"></iframe> </div> </div> <!--main/end--> ``` ### JS ``` <script> //重置iframe容器的高度 var headerHeight; $(function () { content = $("#content"); headerHeight = 48; content.height($(window).height() - headerHeight); $(window).resize(function () { content.height($(window).height() - headerHeight); }); }) </script> ``` 如图所示: ![mark](http://qiniu.newthink.cc/blog/20171024-150404011.png) ![mark](http://qiniu.newthink.cc/blog/20171024-150437949.png) ![mark](http://qiniu.newthink.cc/blog/20171024-150445068.png)