我需要删除所有边框 .我已经加了 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/