Webix Web 皮肤中的样式按钮

Styling buttons in Webix Web skin

对于我的应用程序,我使用带有 'web' 皮肤的 Webix。当按钮为:

时,我正在尝试自定义按钮的背景

我使用相应的CSS-选择器:

  .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

我认为它应该是点击按钮的 class,但它不起作用,我坚持这个。感谢任何帮助。

css 选择器“.webixtype_base:active”在 webix.css 中有 "background: #dedede!important;"。这就是为什么“.mouseover button:active”的背景样式被覆盖的原因。 您只需添加“!important”即可让您的背景样式优先。

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