0

我正在使用 GWT 在我的网页上展示披露面板。我已经成功创建并展示了面板,但标题的颜色是蓝色的。这是典型的链接颜色。我找到了函数 getHeaderTextAccessor() 但这只能编辑文本而不是标题的样式。如何更改颜色?

4

2 回答 2

0

如果 GWT 表示 Google Webkit Toolkit(我对这两个术语都不熟悉),那么根据这个链接,只需使用其中一个 css 规则。它应该改变颜色,希望如此。

.gwt-DisclosurePanel { the panel's primary style }
.gwt-DisclosurePanel-open { dependent style set when panel is open }
.gwt-DisclosurePanel-closed { dependent style set when panel is closed }
.header { the header section }
.content { the content section }

(来自上面的链接)

于 2012-05-23T20:01:25.230 回答
0

导航到您的“公共”文件夹并在其中创建一个 style.css 文件并添加

.myDisclosurePanel {
    background-color: #000000
 }

然后在同一个“公共”文件夹中添加该行

<link ref="stylesheet" type="text/css" href="style.css"">

在节中。然后在您的代码中将样式“myDisclosurePanel”应用于披露面板对象

.setStyleName("myDisclosurePanel");
于 2012-05-24T04:34:03.177 回答