JoeyBruce 2015-10-27 08:17 采纳率: 0%
浏览 7159

页面内容不能随浏览器窗口大小而改变大小,且内容超出窗口也不会出现滚动条

本人小白,现在做一个小的Web项目,使用的是ExtJs,但是页面的显示样式和布局有问题,页面中的内容显示不全,也不能随着浏览器窗口大小而改变显示内容。
求大神告知。下面是页面!图片说明
主页面panel和viewport组件:

 var panel = new Ext.Panel({
                    //height: '60%',
                    layout: 'border',
                    //anchor: '100%,100%',
                    //min
                    width: 500,
                    region: 'center',
                    autoScroll: true,
                    //style: 'background:#065279',
                    items: [northpanel, tree, mainPanel]
                });

                viewport = new Ext.Viewport({
                    layout: 'border',
                    //style: 'background-image: url(../images/background_image.jpg); background-repeat: no-repeat',
                    items: [panel],
                    //renderTo: Ext.getBody(),
                    listeners: {
                        'resize': function(viewport, adjWidth, adjHeight, rawWidth, rawHeight) {
                            //Ext.getCmp("content-panel").setHeight(document.body.clientHeight);
                            //Ext.getCmp("content-panel").setWidth(document.body.clientWidth * 0.9);
                            //Ext.getCmp("power_treepanel").setWidth(document.body.clientWidth * 0.1);
                            //Ext.getCmp("content_tab").setWidth(document.body.clientWidth - 225);
                        }
                    }
                });

                                var mn = mainPanel.add({
                    'id': 'dekstop001',
                    'title': '欢迎使用****管理系统',
                    closable: true,
                    height: document.body.clientHeight * 0.8,
                    //width : document.body.clientWidth,
                    border: false,
                    html: '<iframe scrolling="auto"  frameborder="0" width="100%" height="100%" src="../project/dekstop.html"></iframe>'
                });

iframe中子页面Viewport和Panel代码:

 var QueryPanel = Ext.create('Ext.panel.Panel',{
                id: 'QueryPanel',
                region: 'center',
                frame: true,
                //bodyPadding: '0 10 0 10',
                height: 660,
                //autoScroll: true,
                items: [
                    ResultGrid,
                    OutProductGrid
                ],
                tbar: []

            });

            var QueryOrderViewPort = Ext.create('Ext.container.Viewport',{
                id: 'QueryOrderViewPort',
                renderTo: 'queryorder',
                frame: true,
                autoScroll: true,
                items: [QueryPanel]
            });

                    <body style="min-width: 1000px;min-height:650px" background-color="#EED2EE;">
      <div id="queryorder"></div>
  </body>

跪求解决方法!!!

  • 写回答

3条回答 默认 最新

  • JasonWcx 2015-11-09 03:13
    关注

    layout设置为fit

    评论

报告相同问题?

悬赏问题

  • ¥15 微信公众号自制会员卡没有收款渠道啊
  • ¥15 stable diffusion
  • ¥100 Jenkins自动化部署—悬赏100元
  • ¥15 关于#python#的问题:求帮写python代码
  • ¥20 MATLAB画图图形出现上下震荡的线条
  • ¥15 关于#windows#的问题:怎么用WIN 11系统的电脑 克隆WIN NT3.51-4.0系统的硬盘
  • ¥15 perl MISA分析p3_in脚本出错
  • ¥15 k8s部署jupyterlab,jupyterlab保存不了文件
  • ¥15 ubuntu虚拟机打包apk错误
  • ¥199 rust编程架构设计的方案 有偿