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

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

问题描述

我想问问你,这是任何方式自定义样式添加到选择按钮(电池?)我需要设置例如红色为一个单元,黄色为另一个小区。

这是可能的,从这个选择按钮删除检查图片,并将其替换为标准复选框输入?

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

在这里输入的形象描述

和我想改变这样的(预期选择按钮):

在这里输入的形象描述


解决方案

 <风格>
    的.ui格行> [UI格行]的.ui网 - 禁用选择{
        背景色:黄色;
    }
    的.ui并网row.ui格行选定的GT&; [UI格行]的.ui网 - 禁用选择{
        背景色:红色;
    }
< /风格>

要更改图标,你需要添加一个 图标字体 。默认的UI字体电网不具备的复选框。然后,你可以做一些像这样:

 的.ui格图标-OK:前{
    内容:'\\ 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天全站免登陆