Reputation: 17
How to set image under other image. There are two pictures user's photo and semi transparent picture which need to set over user's photo. How to do it with ExtJs
Upvotes: 0
Views: 84
Reputation: 14589
Try this way.
Ext.create('Ext.Img', {
src: 'http://www.sencha.com/img/20110215-feat-html5.png',
width: 184,
height: 90,
autoEl: {
tag: 'div'
},
id: 'image1',
renderTo: Ext.getBody()
});
Ext.create('Ext.Img', {
src: 'http://orig01.deviantart.net/2890/f/2012/168/0/a/labyrinth_free_background_transparent_png_by_jacobmainland-d53tglc.png',
width: 184,
height: 90,
style: 'position:absolute;left:0px;top:0px;',
renderTo: Ext.get('image1')
});
EDIT:
tbar: [{
xtype: 'image',
src: 'http://www.sencha.com/img/20110215-feat-html5.png',
width: 184,
height: 90,
autoEl: {
tag: 'div'
},
id: 'abc',
listeners: {
render: function() {
Ext.create('Ext.Img', {
src: 'http://orig01.deviantart.net/2890/f/2012/168/0/a/labyrinth_free_background_transparent_png_by_jacobmainland-d53tglc.png',
width: 184,
height: 90,
style: 'position:absolute;left:0px;top:0px;',
renderTo: Ext.get('abc')
});
}
}
}],
Upvotes: 1