【问题标题】:Change the width and height of jQuery slider更改 jQuery 滑块的宽度和高度
【发布时间】:2011-12-07 23:39:11
【问题描述】:

我想更改 jquery 滑块 UI 的宽度和高度。我正在使用ui-lightness 主题。我试图通过在我的样式表中添加以下代码来覆盖默认的 jquery.css。

.ui-slider .ui-slider-horizontal { height: .6em; }
.ui-slider .ui-slider-handle {
  position: absolute;
  z-index: 2;
  width: 1em;
  height: 1em;
  cursor: default;
}

但是上面的css没有效果。 jquery.css 覆盖了上面的样式,我看到滑块没有变化。如何覆盖默认的 jquery.css 样式?

【问题讨论】:

    标签: css jquery-ui overriding jquery-ui-slider


    【解决方案1】:

    尝试在 width 和 height 声明之后添加 !important 规则,如下所示:

    width:1em !important;
    height:1em !important;
    

    这应该会强制阅读您的声明。

    【讨论】:

      猜你喜欢
      • 2013-12-07
      • 2019-07-12
      • 1970-01-01
      • 1970-01-01
      • 2013-02-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2012-01-12
      相关资源
      最近更新 更多