英文:
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);
}
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论