2013-04-04 70 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