[英]GWT css style overriding
I want to override my label color so redfined it one of the css in application using.gwt-label class.我想覆盖我的 label 颜色,因此在使用.gwt-label class 的应用程序中将其重新定义为 css 之一。 However at one specific location in the application, I need a different color.
但是在应用程序的一个特定位置,我需要不同的颜色。 So I did the overriding the css style class in the UI binder of that class using @external
所以我使用@external在class的UI活页夹中覆盖了css风格
<ui:style field='otherStyle'>
@external .gwt-Label;
.gwt-Label { color: #fff; }
</ui:style>
It works fine but the moment I access this page in the browser, all the labels style take the effect of above style.它工作正常,但当我在浏览器中访问此页面时,所有标签样式都采用上述样式。
Any clue would be helpful.任何线索都会有所帮助。
Thanks in advance提前致谢
I recommend you use a different style name, and add it to all of the elements you want to be a different color.我建议您使用不同的样式名称,并将它添加到您想要的所有元素中以不同的颜色。 You can't selectively choose which version of a single css class to use on different elements.
您不能选择性地选择单个 css class 的哪个版本用于不同的元素。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.