Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/java/381.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Java VaadinFlow中的网格样式_Java_Vaadin_Vaadin Grid_Vaadin Flow - Fatal编程技术网

Java VaadinFlow中的网格样式

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

我已尝试通过shared-styles.html(webapp/frontend/styles)更改我的Vaadin Flow网格标题的背景颜色:


[部分~=“标题单元格”]{
背景颜色:蓝色;
}
对应于,这应该可以工作-但它不

怎么了?

不应在
标记内,而应在其旁边。此外,默认情况下,背景色似乎将被覆盖,因此您可以尝试添加
!重要信息
,请稍后进行测试。对我来说,设置
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>