EXTJS标签图标大小32x32

时间:2013-07-04 19:03:09

标签: extjs tabs icons

我使用这个CSS来设置标签的高度

.MainPanel .x-tab-bar-strip {
    top: 40px !important; /* Default value is 20, we add 20 = 40 */
}

.MainPanel .x-tab-bar .x-tab-bar-body {
    height: 43px !important; /* Default value is 23, we add 20 = 43 */
    border: 0 !important; /* Overides the border that appears on resizing the grid */
}

.MainPanel .x-tab-bar .x-tab-bar-body .x-box-inner {
    height: 41px !important; /* Default value is 21, we add 20 = 41 */
}

.MainPanel .x-tab-bar .x-tab-bar-body .x-box-inner .x-tab {
    height: 41px !important; /* Default value is 21, we add 20 = 41 */
}

.MainPanel .x-tab-bar .x-tab-bar-body .x-box-inner .x-tab button {
    height: 33px !important; /* Default value 13, we add 20 = 33 */
    line-height: 33px !important; /* Default value 13, we add 20 = 33 */
}

问题是Icon无法正常显示。

enter image description here

问题

我想将标签图标大小更改为32x32并对齐中间。

1 个答案:

答案 0 :(得分:0)

尝试重新定义此类:

*.MainPanel .x-tab-icon-el img{
    width: 100%; /* did this to center the icons */ 
    height: 100%; /* did this to center the icons */ 
    display: block; /* did this to center the icons */ 
    margin-left: auto; /* did this to center the icons */ 
    margin-right: auto;    /* did this to center the icons */ 
}*

如果需要,还有标签内容的其余部分

*.MainPanel .x-tab-inner .x-tab-inner-center{
}*