我想更改 jquery slider 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 覆盖了上面的样式,我看不到 slider 有任何变化。如何覆盖默认的 jquery.css 样式?
最佳答案
尝试在 width
和 height
声明之后添加 !important
规则,如下所示:
width:1em !important;
height:1em !important;
这应该强制阅读您的声明。
关于css - 更改 jQuery slider 的宽度和高度,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/8417955/