CSS 删除特定数据表上的所有边框
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/18880208/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Remove all borders on a specific datatable
提问by John Alexander Betts
I need to hide all borders of one datatable, not all, using PrimeFaces. I have tried many things and no one has worked. Does anyone know how to do it?
我需要使用 PrimeFaces 隐藏一个数据表的所有边框,而不是全部。我尝试了很多东西,但没有一个成功。有谁知道怎么做?
I have applied the following styles (separately) to the ui-datatable
class:
我已将以下样式(单独)应用于ui-datatable
该类:
border: hidden !important;
border-style: none !important;
And another things...
还有一点...
回答by BalusC
Assuming a PrimeFaces 3.5 data table which is marked up as follows,
假设一个 PrimeFaces 3.5 数据表,其标记如下,
<p:dataTable ... styleClass="borderless">
then this style should do:
那么这种风格应该做:
.ui-datatable.borderless thead th,
.ui-datatable.borderless tbody,
.ui-datatable.borderless tbody tr,
.ui-datatable.borderless tbody td {
border-style: none;
}
回答by zedtimi
with JSF 2, PrimeFaces 3.5
使用 JSF 2、PrimeFaces 3.5
<p:dataTable ... styleClass="borderless">
css:
css:
.borderless .ui-datatable thead th,
.borderless .ui-datatable tbody,
.borderless .ui-datatable tbody tr,
.borderless .ui-datatable tbody td {
border: none;
display: none;
}
for datatable header:
对于数据表头:
.borderless .ui-state-default,
.borderless .ui-widget-content .ui-state-default,
.borderless .ui-widget-header .ui-state-default {
border: none;
}