在GWT UiBinder中设置“filter”css值时发出警告

时间:2012-11-13 00:53:39

标签: css gwt uibinder

我有以下警告:

00:48:06.843 [WARN] [XXXX] Line 71 column 11: encountered ":". 
Was expecting one of: "}" "+" "-" "," ";" "/" <STRING> <IDENT> <NUMBER> <URL> <PERCENTAGE> <PT> <MM> <CM> <PC> <IN> <PX> <EMS> <EXS> <DEG> <RAD> <GRAD> <MS> <SECOND> <HZ> <KHZ> <DIMEN> <HASH> <IMPORTANT_SYM> <UNICODERANGE> <FUNCTION> 

在第71行中,我有以下一行

<ui:style>
...
    .menuPopup {
        position:absolute; 
        top: 5px; 
        right: -80px;
        width:100px; 
        background-color: #F2F2F2; 
        -moz-box-shadow: -1px 2px 5px 1px rgba(0, 0, 0, 0.5); 
        -webkit-box-shadow: -1px 2px 5px 1px rgba(0, 0, 0, 0.5); 
        box-shadow:-1px 2px 5px 1px rgba(0, 0, 0, 0.5); 
        filter: progid:DXImageTransform.Microsoft.Shadow(color='#888888',Direction=135, Strength=3);    
    }
</ui:style>

当我删除filter: progid:...行时,它可以正常工作。

GWT是否存在filter属性的问题?

1 个答案:

答案 0 :(得分:7)

filter不遵循CSS语法,因此您必须使用GWT CssResource的{​​{3}}:

filter: literal("progid:DXImageTransform.Microsoft.Shadow(color='#888888',Direction=135, Strength=3)");