更改选择按钮的样式和/或条件样式 [英] Change style and/or conditional style of the selection button

查看:280
本文介绍了更改选择按钮的样式和/或条件样式的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想问你,是否有任何方式添加自定义风格到选择按钮(单元格?)我需要设置为例如一个单元格的红色,另一个单元格的黄色。



可以从此选择按钮中删除检查图片,并将其替换为标准复选框输入?



我的意思是这个(原始选择按钮):





,我想要这样改变(预期选择按钮):



< img src =https://i.stack.imgur.com/42F68.pngalt =enter image description here>

解决方案

 < style& 
.ui-grid-row> [ui-grid-row] .ui-grid-disable-selection {
background-color:yellow;
}
.ui-grid-row.ui-grid-row-selected> [ui-grid-row] .ui-grid-disable-selection {
background-color:red;
}
< / style>

要更改图标,您需要添加 图标字体 。默认的UI网格字体没有复选框。然后你可以这样做:

  .ui-grid-icon-ok:before {
content: \f096';
font-family:FontAwesome;注意:我使用浏览器的文档检查器来识别这些选择器(Windows中的F12) )。您也应该熟悉该工具。


I would like to ask you, it's any way to add custom style to the selection button (cell?) I need set for example red color for one cell, yellow color for another one cell.

It's possible to remove check picture from this selection button and replace it to standard checkbox input?

I mean this (original selection buttons):

and I would like to change like this (expected selection buttons):

解决方案

<style>
    .ui-grid-row > [ui-grid-row] .ui-grid-disable-selection {
        background-color: yellow;
    }
    .ui-grid-row.ui-grid-row-selected > [ui-grid-row] .ui-grid-disable-selection {
        background-color: red;
    }
</style>

To change the icon you'll need to add an icon font. The default UI Grid font doesn't have the checkbox. Then you can do something like so:

.ui-grid-icon-ok:before {
    content: '\f096';
    font-family: FontAwesome;
}

Note: I used my browser's document inspector to identify these selectors (F12 in Windows). You should become familiar with that tool as well.

这篇关于更改选择按钮的样式和/或条件样式的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆