Webix Web皮肤中的样式按钮

时间:2016-12-28 18:37:23

标签: javascript html css button webix

对于我的应用,我将Webix与'web'皮肤一起使用。当按钮为:

时,我正在尝试自定义按钮的背景
  • 悬停
  • 点击(当按下鼠标按钮时)
  • 专注

我使用相应的CSS-slectors:

  .mouseover button:active {
    background:#d7dff7;     
    border-color:#d7dff7;
  }
  .mouseover button:focus{
    background:#e2d7f7;
    border-color:#e2d7f7;
  }  
  .mouseover button:hover{
    background:#c2cae0;
    border-color:#c2cae0;
  }

我唯一无法触及的是active选择器。在下面的示例中,尝试单击任何按钮,您将看到默认的灰色背景:

http://webix.com/snippet/a5687eff

我认为它应该是点击按钮的类,但它不起作用,我坚持这个。任何帮助表示赞赏。

1 个答案:

答案 0 :(得分:1)

css选择器“.webixtype_base:active”有“background:#dedede!important;”在webix.css中。这就是为什么要覆盖“.mouseover button:active”的背景样式。 您只需添加“!important”,以便您的背景风格优先。

见这里:http://webix.com/snippet/1ee67de2