转自:http://blog.youkuaiyun.com/bq_cui/article/details/8544821
- Ext.define('MyApp.view.MyViewport_1', {
- extend: 'Ext.container.Viewport',
- layout: {
- type: 'border'
- },
- initComponent: function() {
- var me = this;
- Ext.applyIf(me, {
- items: [
- {
- xtype: 'panel',
- region: 'center',
- layout: {
- type: 'absolute'
- },
- //设置背景图片
- bodyStyle: {
- //background: '#ffc',
- background: 'url(http://localhost/T0115/app/view/1.jpg) no-repeat #00FFFF',
- padding: '10px'
- },
- title: 'My Panel'
- }
- ]
- });
- me.callParent(arguments);
- }
- });

本文介绍如何使用ExtJS创建包含特定布局和背景图片的视口组件。通过定义Viewport和内部面板,设置绝对布局及背景样式。
2527

被折叠的 条评论
为什么被折叠?



