<div class="page-content text-center" style="height: calc(100% - 55px);overflow:hidden" >
<iframe id="iframe" src="/vproject/base/projectview.jsp?id=" th:attrappend="src=${project.id}" onload="changeFrameHeight()" scrolling="no"
frameborder="0"
name="frame-0"
class="page-frame animation-fade"
style="width: 100%;height: 100%; "></iframe>
</div>
js中
function changeFrameHeight() {
var ifm = document.getElementById("iframe");
ifm.height = 0;
// ifm.height = document.documentElement.clientHeight;
//alert(ifm.contentWindow.document.documentElement.scrollHeight);
ifm.height = ifm.contentWindow.document.documentElement.scrollHeight;
/**/
}
window.onresize = function () {
changeFrameHeight();
};