我正在使用 GWTP,我正在尝试boxcontainer
在 div 元素中包含样式。但是,它不起作用。似乎CSS没有正确链接?有任何想法吗?谢谢
资源/Thumbnail.css
.boxcontainer {
width:100%;
height:900px;
border:0px solid #000;
padding-top:20px;
padding-bottom:5px;
padding-right:15px;
padding-left:15px;
margin: 0px auto -1px auto;
background: #000000;
}
Thumbnail.ui.xml(HTML 模板)
<ui:UiBinder xmlns:ui='urn:ui:com.google.gwt.uibinder'
xmlns:g='urn:import:com.google.gwt.user.client.ui'>
<ui:with field="res" type="com.gw.aaaa.client.presenter.dashboard.ThumbnailResources"/>
<div ui:field='container' class="{res.style.boxcontainer}"></div>
</ui:UiBinder>
缩略图资源.java
public interface ThumbnailResources extends ClientBundle {
public static final ThumbnailResources INSTANCE = GWT.create(ThumbnailResources.class);
@Source("resources/Thumbnail.css")
ThumbnailStyle style();
}
ThumbnailStyle.java
public interface ThumbnailStyle extends CssResource {
String boxcontainer();
}