技术学习

我所喜欢的

  博客园  :: 首页  :: 新随笔  :: 联系 :: 订阅 订阅  :: 管理
<link rel="stylesheet" type="text/css" href="../../themes/default/easyui.css">
<style>.datagrid-cell{line-height:25px}</style>

  

Easyui---numberbox(插件)重写css样式,有需要的朋友可以参考下。

 

  修改css样式也适用于其他的插件。当然有的插件可以通过format的js函数来实现样式修改。 
  对于numberbox,直接在style中修改css样式,比如改变字体大小(font-size,font-weight)和颜色(color)是不行的。

重写EasyUI datagrid title样式:

<style>
    .datagrid-header-row td{background-color:blue;color:#fff}
    </style>

  

1 全局性修改,即将所有的numberbox的CSS样式重写

<!-- 重载easyui 的css样式 --><style> .numberbox .textbox-text{text-align: center; }</style>

  

2 修改特定的numberbox的css样式

//更改numberbox 的css样式 
$('#amount_in').numberbox('textbox').css('text-align','center'); 
$('#amount_in').numberbox('textbox').css('color','red'); 
$('#amount_in').numberbox('textbox').css('font-size',20); 
$('#amount_in').numberbox('textbox').css('font-weight','bold');

  

posted on 2016-03-04 10:31  飘扬De黑夜  阅读(3216)  评论(0编辑  收藏  举报