(31)ExtJS之Panel面板锚定位中的参考边定位

Ext.onReady(function(){
	Ext.create('Ext.panel.Panel',{
		layout:'anchor',
		title:'Ext.layout.container.Anchor布局示例',
		autoScroll:true,
		frame:false,
		height:150,
		width:300,
		renderTo:Ext.getBody(),
		defaults:{
			bodyStyle:'background-color:#FFFFFF;padding:15px'//设置面板体的背景色
		},
		items:[{
			anchor:'r b',//相对于父容器的右边和底边的差值进行定位
			width:200,
			height:100,
			title:'子面板'
		}]
		
	});
	
});

你可能感兴趣的:((31)ExtJS之Panel面板锚定位中的参考边定位)