java Primefaces 数据表 - 更改字体大小
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/17269350/
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
Primefaces Datatable - Change font size
提问by Apoorv Kansal
I was wondering if it possible to make the font size of column headers and body smaller of p:datatable?
我想知道是否可以使 p:datatable 的列标题和正文的字体大小更小?
I am not sure how to do this with css.
我不知道如何用 css 做到这一点。
回答by newuser
Try this,
试试这个,
apply the below style to the p:dataTable
将以下样式应用于 p:dataTable
style="font-size:8px;"
(or)
(或者)
override the styleclass the default value of the font-size is 12px;
覆盖 styleclass 字体大小的默认值为 12px;
<style>
.ui-widget {
font-size: 8px;
}
</style>
Reference : http://www.w3.org/TR/CSS2/cascade.html#important-rules