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

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

问题描述

我想问你,有没有办法给选择按钮(单元格?)添加自定义样式?我需要为一个单元格设置例如红色,另一个单元格设置为黄色.

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>

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

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;
}

注意:我使用浏览器的文档检查器来识别这些选择器(Windows 中的 F12).您也应该熟悉该工具.

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天全站免登陆