更改jQuery滑块的宽度和高度 [英] Change the width and height of jQuery slider
本文介绍了更改jQuery滑块的宽度和高度的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我想更改jquery滑块UI的宽度和高度.我正在使用ui-lightness
主题.我试图通过在样式表中添加以下代码来覆盖默认的jquery.css.
I want to change the width and height of jquery slider UI. I am using ui-lightness
theme. I tried to override the default jquery.css by adding the following code in my style sheet.
.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样式?
But the above css has no effect. jquery.css overrides the above style and I see no change in the slider. How to override the default jquery.css styles?
推荐答案
尝试在width
和height
声明之后添加!important
规则,如下所示:
Try adding the !important
rule over after your width
and height
declaration, like so:
width:1em !important;
height:1em !important;
这将强制您的声明被阅读.
That should force your declaration to be read.
这篇关于更改jQuery滑块的宽度和高度的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文