2013-04-04 72 views
-1

jeasy-ui的DataGrid对表格标题和表格主体数据有自己的一组字体大小。如何更改或指定在jeasyui数据网格中的字体大小?

我有3个DataGrids,但我需要有2个DataGrids的默认字体大小,但对于1个DataGrid,我必须指定字体大小显式。

我该怎么做?

<table class="easyui-datagrid" data-options="singleSelect:true,fitColumns:true" style="height:180px;" id="alertDescDG"> 
    <thead> 
     <tr> 
      <th data-options="field:'label', width:200"></th> 
      <th data-options="field:'value', width:200"></th> 
     </tr> 
    </thead> 
</table> 
+0

请尝试它yoursel f并发布您遇到的问题代码..我们将尽力为您提供帮助 – 2013-04-04 07:38:33

+0

\t \t \t \t \t \t \t \t \t \t \t \t \t \t \t \t \t \t \t \t \t \t \t \t \t \t \t \t \t \t \t \t \t \t \t \t \t \t \t \t \t \t \t \t \t \t \t \t \t \t \t \t \t \t \t \t \t \t \t
Basha 2013-04-04 08:14:46

回答

0

简单地把它添加到样式属性:

style="font-size:24px;" 

或EMS:

style="font-size:1.5em;" 
+0

在样式中添加font-size没有做任何改变。请帮我解决它。 – Basha 2013-04-04 11:45:38

+0

你可能在某处有一个ovveridding样式。除非您提供更多信息,否则我们无法提供帮助。 – 2013-04-04 12:10:45

1

可以在<span>标签的数据包,根据this post from the easyui forum :)

<table class="easyui-datagrid" title="Basic DataGrid" style="width:700px;height:250px"> 
    <thead> 
     <tr> 
      <th data-options="field:'itemid',width:80">Item ID</th> 
      <th data-options="field:'productid',width:100"><span style="font-weight:bold">Product</span></th> 
     </tr> 
    </thead> 
</table> 
+0

真的吗? “你可以。”你能否提高你的英语水平?这个网站不是reddit。 – 2016-04-21 02:09:11

+0

设置列标题样式的最简单方法是在标题周围包装一个元素。 (对不起,我在之前的回复中使用了英文版) – airjasper 2016-05-03 09:25:00