我正在阅读关于vaadin的第8章,我无法理解如何为每个组件定义css样式.我在styles.scss上进行了自定义,但所有自定义都转到了所有组件,我不想这样做.
例
HorizontalLayout hLayout = new HorizontalLayout(); HorizontalLayout hMainLayout = new HorizontalLayout();
我希望hLayout有一个背景图片,hMainLayout没有.
我试试这个,但不行.
.v-horizontallayout-hLayout { background:url("myimage.jpg"); } .v-horizontallayout-hMainLayout { background: none; }
任何的想法 ?