如何在GWT中使用CSSResource应用复杂样式

时间:2013-04-12 10:18:09

标签: css gwt cssresource

在我的项目中,我的CSSResource包用于应用项目的样式。

如何应用example中提供的更复杂的样式?

我无法使用x.setStyleName(refToCss.MenuBar())和addStyleName(refToCess.MenuItem())来应用子样式。

在我的情况下,似乎忽略了第二个(子)样式 MenuItem

我只是在这里使用这个菜单栏作为示例。我想要实现的是拥有多个状态的多个组件。例如。 .component1 .stateA,component2 .stateA ..其中状态A对于component1和component2具有不同的可视外观。

(实际上CSS应该可以工作)。

提前致谢, 沃特

1 个答案:

答案 0 :(得分:0)

In my case the second (child) style MenuItem just seems to be ignored.

为了忽略你应该使用

x.setStylePrimaryName(refToCss.MenuBar());