0
只是玩Vaadin,看起来像非常基本的布局问题。 代码:Vaadin布局间距
final VerticalLayout screen = new VerticalLayout();
//screen.setStyleName("mid-blue");
screen.setWidth("100%");
screen.setHeight("100%");
screen.setSpacing(false);
screen.setMargin(false);
final VerticalLayout top = new VerticalLayout();
screen.addComponent(top);
top.setStyleName("black");
top.setWidth("100%");
top.setHeight("30%");
top.setSpacing(false);
top.setMargin(false);
final VerticalLayout bot = new VerticalLayout();
screen.addComponent(bot);
bot.setStyleName("light-blue");
bot.setWidth("60%");
bot.setHeight("100%");
bot.setSpacing(false);
bot.setMargin(false);
screen.setComponentAlignment(bot,Alignment.TOP_CENTER);
setContent(screen);
CSS:
@import "../valo/valo.scss";
@mixin test {
@include valo;
.mid-blue {
background: #71C6E5;
}
.black {
background: black;
}
.light-blue {
background-color: #A2DCF2;
}
.white {
background-color: white;
}
.green {
background: green;
}
}
能否请您解释一下为什么是在那里的布局和如何控制或删除其之间如此巨大的落差?
非常感谢这个伟大的答案。它的窍门! – Omryf