(29)ExtJS之Panel面板锚定位中的百分比定位

Ext.onReady(function(){
	Ext.create('Ext.panel.Panel',{
		layout:'anchor',
		title:'Ext.layout.container.Anchor布局示例',
		frame:false,
		height:150,
		width:300,
		renderTo:Ext.getBody(),
		defaults:{
			bodyStyle:'background-color:#FFFFFF;padding:15px'//设置面板体的背景色
		},
		items:[{
			anchor:'50% 50%',//设置子面板的宽高为父面板的50%
			title:'子面板'
		}]
		
	});
	
});

你可能感兴趣的:((29)ExtJS之Panel面板锚定位中的百分比定位)