gpt4 book ai didi

css - vaadin 组件 setstylename 无效

转载 作者:行者123 更新时间:2023-11-28 16:33:39 25 4
gpt4 key购买 nike

以下应该有效。但事实并非如此。 (CSS 更改没有任何效果)出了什么问题?

@Theme("mytheme")
@Widgetset("de.datalovers.MyAppWidgetset")
public class MyUI extends UI {

@Override
protected void init(VaadinRequest vaadinRequest) {
verticalLayout = new VerticalLayout();
String s = "Montag 07:30 - 12:00"
Label label = new Label();
label.setStyleName("mystyle");

mytheme.sccs:

    @import "../valo/valo.scss";

@mixin mytheme {
@include valo;

// Insert your own theme rules here

.mystyle{

color: blue;
background: yellow;
font-size: 40px;

}
}

样式.sccs

@import "mytheme.scss";
@import "addons.scss";

// This file prefixes all rules with the theme name to avoid causing conflicts with other themes.
// The actual styles should be defined in mytheme.scss

.mytheme {
@include addons;
@include mytheme;
}

最佳答案

在使用 CSS 和 Vaadin 时不要忘记清空缓存 (CTRL + F5)。并在处理样式表后重新编译主题。

关于css - vaadin 组件 setstylename 无效,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/34926980/

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