总结(Jquery)前台的页面的分辨率自适应问题

来源:互联网 发布:手机淘宝新品上架文字 编辑:程序博客网 时间:2024/06/18 02:03
        做的项目自适应:原来的自适应不好,就是把宽度和高度写的固定了,现在不是了,页面是百分比的显示,而且那个页面的高度通过下面获得:
    
varw = $(document).width();// 浏览器当前窗口文档的宽度
     varh = $(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>
  上面的高度是百分比*页面的高度,还有宽度都是百分比弄的,这样才能自适应。



阅读全文
0 0
原创粉丝点击