【问题标题】:Styling buttons in Webix Web skinWebix Web 皮肤中的样式按钮
【发布时间】:2016-12-28 18:37:22
【问题描述】:

对于我的应用程序,我使用带有“网络”皮肤的 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

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

【问题讨论】:

    标签: javascript html css button webix


    【解决方案1】:

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

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

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2013-05-01
      • 1970-01-01
      • 2011-01-04
      • 1970-01-01
      • 1970-01-01
      • 2011-11-12
      • 1970-01-01
      相关资源
      最近更新 更多