extjs - 如何删除面板边框?

标签 extjs border frame

我需要删除所有边框 .我已经加了 border:false但它不起作用。

请注意,我希望它具有这种蓝色背景,因此我使用的是 frame : true .

我的代码

        region: 'north',
        split: true,
        border: false, 
        height: 115,
        layout: 'border',
        items: [ {///Account info
            xtype: 'form',
            region: 'east',
            border: false,
            frame: true,
            //height: 100,
            width: 500, //'49%',//anchor : '50%',
            layout: 'column',

                items: [
                    { columnWidth: .5,
                      border: false, 
                      frame: true, 
                      defaults: { labelStyle: 'font-size:9px' },
                      items: [{
                            xtype: 'displayfield',
                            fieldLabel: 'Customer',
                            value: '<span style="color:blue;font-size:9px">IBM</span>'
                        }, {
                            xtype: 'displayfield',
                            fieldLabel: 'Subscription',
                            value: '<span style="color:blue;font-size:9px">On demand</span>'
                        }, {
                            xtype: 'displayfield',
                            fieldLabel: 'Remaining credits',
                            value: '<span style="color:blue;font-size:9px">23</span>'
                        }]

                    }, {
                        columnWidth: .5, 
                        border: false, 
                        frame: true,
                        margin : '0 0 0 8',
                        defaults: { labelStyle: 'font-size:9px' },
                        items: [{
                            xtype: 'displayfield',
                            fieldLabel: 'Account',
                            value: '<span style="color:blue;font-size:9px">Mike</span>'
                        }, {
                            xtype: 'displayfield',
                            fieldLabel: 'credentials',
                            value: '<span style="color:blue;font-size:9px">User</span>'
                        }]

                    }

最佳答案

你的问题是你有 frame: true配置。将其设置为 false,它将删除蓝色边框。

false by default to render with plain 1px square borders. true to render with 9 elements, complete with custom rounded corners (also see Ext.Element.boxWrap).



另外,蓝色背景与frame无关。配置选项

编辑:删除 frame: true 时您需要添加一个配置选项来设置背景颜色的样式...
bodyStyle: 'background-color:#dfe8f5;'
编辑 2:就像评论中提到的 Elgin 一样,最好使用透明的背景颜色来使主题更改更容易......
bodyStyle: 'background-color: transparent;'

关于extjs - 如何删除面板边框?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/6443197/

相关文章:

css - 如何在 CSS 中为 SVG 元素添加边框/轮廓/描边?

ios - UIScrollView 框架属性

类中的 Python Tkinter 滚动条

extjs - 如何将记录分配给 ExtJs 中的关联模型?

javascript - 将自定义 css 类添加到 ExtJS 4.0.7 面板标题

html - 为什么关闭 1 像素边框会在固定位置标题和 Flex 增长的情况下产生 75 像素溢出?

css - 仅在一页上从类中删除样式?

ios - 如何在运行时设置 UIView 的边框颜色

extjs - Gridpanel 在分页时丢失过滤器

javascript - 在 MixedCollection 中搜索项目