开发者

Programmatic access to inline Styles where name is separated with dashes

Here is shown how to use styles in CamelC开发者_C百科ase, but how to use styles with a dash in its name? Valid Java method name can't have dashes in it (at least eclipse shows syntax error).

Style defined in template:

.menu-inactive{ background-color: grey; }


You can use CssResource.ClassName for valid CSS class names that are invalid Java identifiers.

interface MyCssResource extends CssResource {
    @CssResource.ClassName("menu-inactive")
    String menuInactive();
}
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜