Change the width and height of jQuery slider

。_饼干妹妹 提交于 2019-12-21 12:24:02

问题


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;
}

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?


回答1:


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.



来源:https://stackoverflow.com/questions/8417955/change-the-width-and-height-of-jquery-slider

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!