如何编辑“Disclosure Panel”标题的颜色

时间:2012-05-23 19:30:46

标签: html css gwt

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

2 个答案:

答案 0 :(得分:0)

如果GWT意味着Google Webkit Toolkit(我不熟悉这两个术语),那么根据这个link,只需使用其中一个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 }

(来自上面的链接)

答案 1 :(得分:0)

导航到您的"公众"文件夹并在那里创建一个style.css文件并添加

.myDisclosurePanel {
    background-color: #000000
 }

然后在同一个" public"文件夹添加行

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

在该部分。然后在您的代码中应用样式&#34; myDisclosurePanel&#34;披露小组对象

.setStyleName("myDisclosurePanel");