一、Panel的border属性:

示例:

Ext.create('Ext.panel.Panel', {
                title: 'Hello',
                width: 200,
                height:100,
                border:true,//设置具体值无效,如:border:12
                html: '<p>World!</p>',
                renderTo: Ext.getBody()
            });

虽然在API中查询是可设置border宽度的,但是实际测试只能设置是否显示border,若要设置border宽度,则在style中设置borderWidth属性,如下:

Ext.create('Ext.panel.Panel', {
            title: 'Hello',
            width: 200,
            height:100,
            border:true,//显示边框
//                border: 15,//设置具体值无效无效
//                border:'10 5 3 10',//无效
            style: {
                borderWidth:15,//设置边框宽度
                borderColor: 'red',
                borderStyle: 'solid'
            },
            html: '<p>World!</p>',
            renderTo: Ext.getBody()
        });

效果:

Extjs4.2——Panel

 

相关文章:

  • 2022-12-23
  • 2021-11-28
  • 2022-01-23
  • 2022-12-23
  • 2022-01-08
  • 2021-10-02
  • 2021-10-29
猜你喜欢
  • 2022-02-05
  • 2021-07-05
  • 2021-10-11
  • 2021-07-02
  • 2021-09-13
  • 2022-12-23
相关资源
相似解决方案