Java VaadinFlow中的网格样式
我已尝试通过shared-styles.html(webapp/frontend/styles)更改我的Vaadin Flow网格标题的背景颜色:Java VaadinFlow中的网格样式,java,vaadin,vaadin-grid,vaadin-flow,Java,Vaadin,Vaadin Grid,Vaadin Flow,我已尝试通过shared-styles.html(webapp/frontend/styles)更改我的Vaadin Flow网格标题的背景颜色: [部分~=“标题单元格”]{ 背景颜色:蓝色; } 对应于,这应该可以工作-但它不 怎么了?该不应在或标记内,而应在其旁边。此外,默认情况下,背景色似乎将被覆盖,因此您可以尝试添加!重要信息,请稍后进行测试。对我来说,设置th[part~=“header cell”]似乎足够具体,不会被覆盖 <custom-style> &l
[部分~=“标题单元格”]{
背景颜色:蓝色;
}
对应于,这应该可以工作-但它不
怎么了?该
不应在
或
标记内,而应在其旁边。此外,默认情况下,背景色似乎将被覆盖,因此您可以尝试添加!重要信息
,请稍后进行测试。对我来说,设置th[part~=“header cell”]
似乎足够具体,不会被覆盖
<custom-style>
<style>
</style>
</custom-style>
<dom-module id="my-grid" theme-for="vaadin-grid">
<template>
<style>
th[part~="header-cell"] {
background-color: darkorange;
}
</style>
</template>
</dom-module>
th[部分=“标题单元格”]{
背景色:达克朗格;
}
不在
内部而是在
外部编写
已经足够了-现在它可以工作了-谢谢!
<custom-style>
<style>
</style>
</custom-style>
<dom-module id="my-grid" theme-for="vaadin-grid">
<template>
<style>
th[part~="header-cell"] {
background-color: darkorange;
}
</style>
</template>
</dom-module>