Ext.layout.AbsoluteLayout

Ext.layout.AbsoluteLayout扩展自Ext.layout.AnchorLayout布局,其xtype值为absolute。根据子面板中配置的x/y坐标进行定位,并且坐标值支持使用固定值和百分比两种形式。

new Ext.Panel({  
    renderTo: "div2",  
    frame: true,  
    layout: "absolute",  
    title: "绝对位置布局(AbsoluteLayout)",  
    width: 500,  
    height: 300,  
    defaults: {  
        bodyStyle: "padding:3px; background-color: #FFFFFF" 
    },  
    items: [  
        {x:10, y:10, width:200, title:"嵌套面板1", html:"嵌套面板1"},  
        {x:10, y:"50%", height:100, title:"嵌套面板2", html:"嵌套面板2"}  
    ]  
}); 

你可能感兴趣的:(html,ext)