做的项目自适应:原来的自适应不好,就是把宽度和高度写的固定了,现在不是了,页面是百分比的显示,而且那个页面的高度通过下面获得:
var w = $(document).width(); // 浏览器当前窗口文档的宽度
var w = $(document).width(); // 浏览器当前窗口文档的宽度
var h = $(document).height();
// 浏览器当前窗口文档的高度
$(
'#body').height(h);
$(
'#titlebox').height(h/12);
<div id="fra" style="float: left; background-color: rgb(1, 19, 65); width: 85%; height: 537px;">
<iframe id="myFrame" src="/ticketingterminalanalysis/index" style="border: 0px none; float: right; padding-top: 0px; background-color: rgb(1, 19, 65); width: 100%; height: 537px;"></iframe>
</div>
上面的高度是百分比*页面的高度,还有宽度都是百分比弄的,这样才能自适应。
<div id="fra" style="float: left; background-color: rgb(1, 19, 65); width: 85%; height: 537px;">
<iframe id="myFrame" src="/ticketingterminalanalysis/index" style="border: 0px none; float: right; padding-top: 0px; background-color: rgb(1, 19, 65); width: 100%; height: 537px;"></iframe>
</div>
上面的高度是百分比*页面的高度,还有宽度都是百分比弄的,这样才能自适应。