【问题标题】:Custom CSS for Webix toggle buttonWebix 切换按钮的自定义 CSS
【发布时间】:2016-04-12 16:58:47
【问题描述】:

我正在尝试重新绘制一个切换按钮,但经过所有尝试后,我仍然找不到要覆盖的正确 CSS 样式。

当前的实现是http://webix.com/snippet/ebbe2e11

CSS:

.webix_el_toggle button{
    background-color:grey !important;
    border-color: gray !important;
}
.webix_el_toggle.webix_pressed button{
    background-color:green !important;
    border-color: green !important; 
}

如您所见,.webix_el_toggle.webix_pressed 不起作用,我终于在切换的 CSS 类中迷路了。有办法改吗?

【问题讨论】:

  • 定义“重绘”。将 .webix_el_toggle 按钮背景颜色更改为另一种颜色有效。你想要的样子是什么?
  • @Jeff.Clark 我想将按下的开关的颜色更改为绿色。这两种状态的 CSS 类是不同的,所以我确信这是可能的,但我找不到合适的类来更改。

标签: css button toggle webix


【解决方案1】:

好的,我找到了解决方案。 pressed 切换所需的 CSS 类是 .webix_el_box.webix_pressed:

.webix_el_toggle button{
    background-color:grey !important;
    border-color: gray !important;
}
.webix_el_box.webix_pressed button{
    background-color:green !important;
    border-color: green !important; 
}

Snippet

【讨论】:

    猜你喜欢
    • 2014-06-15
    • 2018-08-05
    • 2011-03-31
    • 2015-03-31
    • 1970-01-01
    • 1970-01-01
    • 2013-08-22
    • 1970-01-01
    • 2013-10-26
    相关资源
    最近更新 更多