Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
如何仅将一些样式添加到 GWT 容器,而不是容器包含的所有小部件?例如,我需要为 CaptionPanel 的标题设置样式(使其变大并更改颜色)。但是当我向整个 CaptionPanel 添加样式时,里面的所有小部件也会继承添加的样式。
CSS 101:将您的样式限制legend为CaptionPanel. 例如
legend
CaptionPanel
myCaptionPanel.addStyleName("foo");
.foo > legend { color: red; } /* use ".foo legend" above, without the ">" if you need to support IE6 */