Extjs 3.x:tabpanel 选项卡中的默认主题颜色而不是白色
我创建了一个 FormPanel
和一个带有多个选项卡的 TabPanel
。选项卡的背景颜色默认为白色,但我希望它们都具有通常出现在 Panel
中的主题(默认蓝色)颜色。
我尝试过添加
bodyStyle: '背景颜色:透明!重要'
对于表单、选项卡面板和选项卡来说,它在 IE9 和 Chrome 中有效,但在 FireFox 中无效?
为什么 transparent
作为伪颜色值在 FireFox 中被丢弃?
JavaScript:
var form = new Ext.form.FormPanel({
border: false,
bodyStyle: 'background-color: transparent !important',
layout: 'fit',
items: [
{
xtype: 'tabpanel',
activeTab: 0,
bodyStyle: 'background-color: transparent !important',
deferredRender: false,
defaults: {
bodyStyle: 'padding: 4px; background-color: transparent !important',
layout: 'form',
autoScroll: true
},
items: [
{
title: 'Tab 1',
items: [
...
]
}, {
title: 'Tab 2',
items: [
...
]
}]
}]
});
I have created a FormPanel
with a TabPanel
with several tabs. The background color of the tabs are default white, but I would like them all to have the theme (default blueish) color normally present in a Panel
.
I have tried adding
bodyStyle: 'background-color: transparent !important'
to the form, tabpanel and tabs, and it works in IE9 and Chrome, but not in FireFox?
How come transparent
as a pseudo color-value is discarded in FireFox?
JavaScript:
var form = new Ext.form.FormPanel({
border: false,
bodyStyle: 'background-color: transparent !important',
layout: 'fit',
items: [
{
xtype: 'tabpanel',
activeTab: 0,
bodyStyle: 'background-color: transparent !important',
deferredRender: false,
defaults: {
bodyStyle: 'padding: 4px; background-color: transparent !important',
layout: 'form',
autoScroll: true
},
items: [
{
title: 'Tab 1',
items: [
...
]
}, {
title: 'Tab 2',
items: [
...
]
}]
}]
});
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
为什么不使用
background:none
来代替呢?查看演示:http://jsfiddle.net/chaoszcat/ug7Qg/。
顺便说一下,
FormPanel
看起来没有蓝色背景。它的背景默认为白色。Why not use
background:none
instead?Check out the demo: http://jsfiddle.net/chaoszcat/ug7Qg/.
By the way, it looks like
FormPanel
doesn't have blueish background. Its background is defaulted to white.