开发者

Programmatic access to inline Styles where name is separated with dashes

开发者 https://www.devze.com 2023-01-18 21:51 出处:网络
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).

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

精彩评论

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