我想設置一個CustomScrollPanel高度100%;我所嘗試的是讓CustomScrollPanel達到100%的高度,但它不能以這種方式工作。這是我想嘗試的。如何將CustomScrollPanel設置爲高度100%?
public class MyScrollPanel extends Composite implements HasWidgets {
private ResizeLayoutPanel resizeLayoutPanel;
private CustomScrollPanel customScrollPanel;
public MyScrollPanel() {
resizeLayoutPanel = new ResizeLayoutPanel();
resizeLayoutPanel.setStyleName(resources.css().resizeLayoutPanel());
customScrollPanel = new CustomScrollPanel();
customScrollPanel.addStyleName(resources.css().customScrollPanel());
resizeLayoutPanel.add(customScrollPanel);
initWidget(resizeLayoutPanel);
}
我的CSS:
.resizeLayoutPanel {
height: 100%;
background-color: yellow;
}
如何獲得CustomScrollPanel身高100%?
您是否將此添加到RootLayoutPanel? –