【发布时间】:2023-06-24 01:36:01
【问题描述】:
我希望我的登录页面在正文中有一个背景图片。到目前为止,这是我所拥有的:
public interface MyResources extends ClientBundle {
public static final MyResources INSTANCE = GWT.create(MyResources.class);
@Source("css/login.css")
public MyLoginCssResource loginCss();
@Source("css/GWT_App.css")
public CommonCss commonCss();
@Source("img/logo.png")
@ImageOptions(repeatStyle = RepeatStyle.Both)
ImageResource backgroundImage();
}
public interface CommonCss extends CssResource {
String body();
}
.body {
background-color: white;
gwt-image: 'backgroundImage';
}
如果我已经引用了 loginCss,如何在我的 ui.xml 文件中引用 commonCSS?
<ui:with field='res' type='client.resources.MyResources' />
<g:HTMLPanel addStyleNames="{res.loginCss.maindiv}">
</g:HTMLPanel>
</ui:UIBinder>
另外,如何在 ui.xml 文件中为 body 标签设置样式?
【问题讨论】:
标签: css gwt uibinder resourcebundle