Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/css/37.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/extjs/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Css 在sencha touch中使用hbox和vbox的布局_Css_Extjs_Sencha Touch - Fatal编程技术网

Css 在sencha touch中使用hbox和vbox的布局

Css 在sencha touch中使用hbox和vbox的布局,css,extjs,sencha-touch,Css,Extjs,Sencha Touch,我是新来的森查触摸。我需要一个布局,图标应水平排列。我尝试了三个图标,但只显示了第一个图标。其他图标隐藏在后面。有谁能帮我改正错误吗 这是我的密码: { xtype: 'panel', layout:'vbox', width:'300', height:'600', align:'center', items:[ { xtype:'image', left:'40%',

我是新来的森查触摸。我需要一个布局,图标应水平排列。我尝试了三个图标,但只显示了第一个图标。其他图标隐藏在后面。有谁能帮我改正错误吗

这是我的密码:

 {                      
    xtype: 'panel',
    layout:'vbox',
    width:'300',
    height:'600',
    align:'center',
    items:[
    {
     xtype:'image',
     left:'40%',
     'http://myimage.com/image.png'
      style: 'background-color: #fff'
    },
    {
     xtype:'image',
     right:'40%',
     'http://myimage.com/image.png'
     style:'background-color: #fff'
    },                   
    ]
},

我建议您在启用配置的情况下创建外部列表:

    Ext.create('Ext.List', {
        fullscreen: true,
        inline: true,
        itemTpl: '<img src="{img}" />',
        data: [
            {img: 'http://myimage.com/image1.png'},
            {img: 'http://myimage.com/image2.png'},
            {img: 'http://myimage.com/image3.png'}
        ]
    });
Ext.create('Ext.List'{
全屏:对,
是的,
itemTpl:“”,
数据:[
{img:'http://myimage.com/image1.png'},
{img:'http://myimage.com/image2.png'},
{img:'http://myimage.com/image3.png'}
]
});

希望有帮助-

您应该将
hbox
flex
一起使用,并且对于图像组件
url
应该提供给
src
config

    {                      
        xtype: 'panel',
        layout:'hbox',
        align:'center',
        defaults: {
            flex : 1
        },
        items:[
           {
              xtype:'image',
              src:'http://myimage.com/image.png',
              style: 'background-color: #fff;'
           },
           {
              xtype:'image',
              src:'http://myimage.com/image.png',
              style:'background-color: #fff'
            }                   
         ]
   }
更新

    {                      
       xtype: 'panel',
       layout:'hbox',
       defaults: {
          flex : 1
       },
        items:[
           {
              xtype:'panel',
              html:'<img width="100%" src="http://myimage.com/image.png">',
              style: 'background-color: #fff;'
            },
            {
              xtype:'panel',
              html:'<img width="100%" src="http://myimage.com/image.png">',
              style:'background-color: #fff'
            }                   
          ]
   }
{
xtype:'面板',
布局:'hbox',
默认值:{
弹性:1
},
项目:[
{
xtype:“面板”,
html:“”,
样式:“背景色:#fff;”
},
{
xtype:“面板”,
html:“”,
样式:“背景色:#fff”
}                   
]
}

感谢您宝贵的回复。。我正在获取图像,但在移动视图中图像相互重叠。你能告诉我如何克服这个问题吗issue@user2790089我想这是因为图像的大小。。查看我的更新