1
SlideIn 또는 SlideOut 중에 구성 요소의 너비를 줄이는 문제를 해결하는 사람이 도와 줄 수 있습니까? Ext JS 버전 4.1 RC1을 사용하고 있습니다.slideIn 및 slideOut는 구성 요소의 너비를 줄입니다.
Ext.onReady(function() {
Ext.create('Ext.container.Viewport', {
layout: 'border',
items: [{
region: 'north',
autoHeight: true,
border: false,
margins: '0 0 5 0',
items: [{
xtype: 'container',
id: 'con_notification-box',
cls: 'notification-box',
hidden: true,
border: true,
width: 500,
height: 0,
style: {
position: 'fixed',
minHeight: '75px !important',
left: '50%',
marginLeft: '-250px',
zIndex: '999999',
backgroundColor: 'white'
},
items:[{
xtype: 'container',
html: '<p>Insert your information text here.</p>'
},{
xtype: 'container',
id: 'con_application-close',
cls: 'notification-close',
html: '<br />Close'
}]
},{
xtype: 'container',
html: '<h1 class="x-panel-header">Your title</h1>'
}]
}]
});
var con_notification_box = Ext.getCmp('con_notification-box').getEl();
con_notification_box.slideIn('t', {
easing: 'easeOut',
duration: 500
});
Ext.getCmp('con_application-close').getEl().on('click',function(){
con_notification_box.slideOut('t', { duration: 2000 });
});
});
도와 주시면 매우 감사하겠습니다. 귀하의 질문은 당신이 뭘 하려는지에 매우 명확하지 않다
답변 해 주셔서 감사합니다. 그러나 "알림 패널"이 중앙에 정렬되기를 원합니다. – shub
센터 위치 지정이 없습니다. 앵커 레이아웃을 사용하여 50 % 오프셋을 지정하거나 센터 레이아웃의 사용자 확장 어딘가를 보았습니다. – dbrin
앵커 레이아웃에서 50 % 오프셋을 설정해야하는 이유는 알고 계십니까? – shub