gpt4 book ai didi

CssResource 改变样式

转载 作者:太空宇宙 更新时间:2023-11-04 15:52:12 25 4
gpt4 key购买 nike

我有这样的界面

public interface PopupPanelWithConfirmStyle extends ClientBundle {

public static final PopupPanelWithConfirmStyle I = GWT.create(PopupPanelWithConfirmStyle.class);

@Source("PopupPanelWithConfirmStyle.css")
public Style css();

public interface Style extends CssResource {

@ClassName("popupPanelWithConfirmStyle")
String popupPanelWithConfirmStyle();

@ClassName("confirmButton")
String confirmButton();
}

}

我有标准的按钮,它有 gwt-PushButton-up,.gwt-PushButton-up-hovering,.gwt-PushButton-up-disabled,.gwt-PushButton-down,.gwt-PushButton-down-hovering, .gwt-PushButton-down-disabled 等样式

所以我设置了 PushButton 样式 - confirmButton 并编写了自己的 css

.popupPanelWithConfirmStyle {
background: none repeat scroll 0 0 white;
padding: 3px;
z-index: 100;
}

.confirmButton{
border-radius: 2px 2px 2px 2px;
margin: 0;
text-decoration: none;
padding: 3px 5px;
}

@external confirmButton-up, confirmButton-up-hovering, confirmButton-up-disabled, confirmButton-down, confirmButton-down-hovering, confirmButton-down-disabled

.confirmButton-up {
-moz-border-bottom-colors: none;
-moz-border-image: none;
-moz-border-left-colors: none;
-moz-border-right-colors: none;
-moz-border-top-colors: none;
border-color: #BBBBBB #BBBBBB #A0A0A0;
border-style: solid;
border-width: 1px;
cursor: pointer;
}

.confirmButton-up-hovering {
border: 1px solid #939393;
cursor: pointer;
}

.confirmButton-up-disabled {
border: 1px solid #BBBBBB;
cursor: default;
opacity: 0.5;
}

.confirmButton-down {
border: 1px inset #666666;
cursor: pointer;
outline: medium none;
padding: 4px 4px 2px 6px;
}

.confirmButton-down-hovering {
-moz-border-bottom-colors: none;
-moz-border-image: none;
-moz-border-left-colors: none;
-moz-border-right-colors: none;
-moz-border-top-colors: none;
border-color: #333333 #939393 #939393;
border-right: 1px solid #939393;
border-style: solid;
border-width: 1px;
cursor: pointer;
}

.confirmButton-down-disabled {
border: 1px outset #CCCCCC;
cursor: default;
opacity: 0.5;
}

当我运行 gwt - 我看到了 -

div tabindex="0" class="GGUR4G1EN GGUR4G1EN-up" role="button" aria-pressed="false"

我该怎么办? .confirmButton-up 将转换为 GGUR4G1EN-up

对不起我的英语。

最佳答案

目前这是不可能的:http://code.google.com/p/google-web-toolkit/issues/detail?id=4746

如果你想利用依赖样式名称,你必须禁用类名的混淆(例如,在 CSS 中使用 @external,而不仅仅是 -up-hover 等变体,也是主要样式名称)。然而,这意味着您可能会在 CSS 资源之间发生命名冲突。

关于CssResource 改变样式,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/11063703/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com