Vaadin grid选定的行颜色

huangapple go评论70阅读模式
英文:

Vaadin grid selected row color

问题

以下是已经翻译好的内容:

Searched a lot to change the default selected row background color of Vaadin 24 grid with CSS,
tried

vaadin-grid::part(selected-row) {
  background: orange;
}

but it is not working.

I am able to change selected row font color with

vaadin-grid::part(selected-row) {
  color: blue;
}

somebody please help.

英文:

Searched a lot to change the default selected row background color of Vaadin 24 grid with CSS,
tried

vaadin-grid::part(selected-row) {
  background: orange;
}

but it is not working.

I am able to change selected row font color with

vaadin-grid::part(selected-row) {
      color: blue;
    }

somebody please help.

答案1

得分: 3

不工作的原因是cells定义了它们自己的背景颜色,所以您需要使用vaadin-grid::part(selected-row-cell)来覆盖它。

英文:

The reason it's not working is that the cells define their own background color, so you need to override that instead with vaadin-grid::part(selected-row-cell)

答案2

得分: 0

尝试将其设置为这样:

vaadin-grid::part(selected-row) {
  background-image: linear-gradient(#ff8800, #ff8800);
}
英文:

Try to set it like this:

vaadin-grid::part(selected-row) {
  background-image: linear-gradient(#ff8800, #ff8800);
}

huangapple
  • 本文由 发表于 2023年7月23日 23:11:10
  • 转载请务必保留本文链接:https://go.coder-hub.com/76748963.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定