Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/html/83.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Html 网格中图像的透明度_Html_Css_Extjs - Fatal编程技术网

Html 网格中图像的透明度

Html 网格中图像的透明度,html,css,extjs,Html,Css,Extjs,我的带有网格和图像透明度的extjs 4.2 MVC应用程序有点问题: 这是我的网格: Ext.define('XProject.view.message.inbox.Grid', { extend: 'Ext.grid.Panel', alias: 'widget.inboxgrid', store: 'message.Inbox', requires: [ 'Ext.ux.grid.FiltersFeature' , 'XMa

我的带有网格和图像透明度的extjs 4.2 MVC应用程序有点问题: 这是我的网格:

Ext.define('XProject.view.message.inbox.Grid', {
    extend: 'Ext.grid.Panel',
    alias: 'widget.inboxgrid',
    store: 'message.Inbox',
    requires: [
        'Ext.ux.grid.FiltersFeature'  ,
        'XMailweb.view.message.inbox.CtxMenu'
    ],

    viewConfig: {
        getRowClass: function (record, rowIndex, rowParams, store) {
            if ((record.get('Flags') & 2 )== 0) {
                return "boldFont";
            }
            if (record.get('Err_Id') != 0) {
                return "redFont";
            }            
        }
    },

    selType: 'checkboxmodel',
    selModel: {
        checkOnly: false,
        injectCheckbox: 0
    },    

    features : [{
        ftype: 'filters',
        autoReload: false, 
        encode:true,
        paramPrefix : 'Filter'
    }],

    columns: [{
        xtype: 'gridcolumn',
        cls: 'attach',
        width: 18,
        dataIndex: 'Files_Num',
        menuDisabled: true,
        sortable:false,
        text: 'Attachment',
        renderer: function(value, metaData, record ){
            if (value >= 1){
                metaData.css  = 'attach';
            }
            return '';
        }       
    }]
})
其他列被省略。 我的css角色是:

.attach {
    background:transparent url('../icons/attach.png') no-repeat center left !important;
    text-indent: -250px;
}
my attach.png是透明的,但渲染栅格时(使用替代行背景色)显示为白色背景。 这是我的透明图像:

和我的渲染网格:

为什么没有透明背景(网格中的所有css图像)? 我尝试使用firefox和iexplorer,但结果是一样的。
有什么想法吗?

背景:背景色上方透明

使用:

.attach,.attach .x-column-header-over{
    background-image:url('../icons/attach.png') !important;
    background-position:center left;
    background-repeat:no-repeat ;
}
在:

background:transparent url('../icons/attach.png') no-repeat center left !important;

你太棒了!另一个问题是附加的标题:鼠标悬停时,图标隐藏。为什么?如果我有其他标题和其他图片,你需要覆盖.x列标题背景吗?我该怎么办?你创建了一个新的专栏和新的类。现在是完美的。非常感谢