EXT--Ext.layout.container 标准布局类
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>自适应布局</title> <link rel="stylesheet" href="ext-4.2.1/resources/css/ext-all.css" /> <script type="text/javascript" src="ext-4.2.1/bootstrap.js"></script> <script type="text/javascript" src="ext-4.2.1/locale/ext-lang-zh_CN.js"></script> <script type="text/javascript"> Ext.onReady(function(){ Ext.create('Ext.panel.Panel',{ title:'Ext.layout.container.Fit', frame:true, renderTo:Ext.getBody(), bodyPadding:5, width:200, // layout:'auto',//自动布局 layout:'fit', //自适应布局 // layout:'accordion', //折叠布局 defaults:{ bodyStyle:'background-color:#FFFFFF' }, //面板items配置项默认的xtype类型为panel 该默认值可以通过defaultType配置项进行更改 items:[{ title:'嵌套面板一', html:'面板一' },{ title:'嵌套面板二', html:'面板二' }] }); }); </script> </head> <body> </body> </html>
?