解决方法:
1.(有滚动条的iframe)
内容放到wrapper里面
html,body{ height:100%; overflow:hidden; } .wrapper{ position:absolute; top:0; left:0; right:0; bottom:0; overflow:auto; }
2.js控制
$('#tabs').tabs({ // border:false, onSelect: function () { var iframe = $("#tabs>div:nth-child(2) iframe") iframe.height("99%"); // console.log(iframe.height()); iframe.scrollWidth; iframe.height("100%"); } })