我使用 jQuery UI 滑块控件。我的滑块宽度为200px. 我希望我的左手柄14px的中心向右移动,我的右手柄的中心向左偏移14px.
我的滑块将超过172px( 200 -14 - 14)。background-image措施200px。_ 的长度14px计算如下:
width of the handle (28px) / 2
我使用默认margin-left: 0px;删除margin-left:-14px。但是,我的右手柄向右移动28px!
你能帮我解开这个谜吗?
.ui-slider .ui-slider-handle {
width: 28px;
height: 28px;
background: url(http://hitskin.com/themes/13/67/44/i_right_arrow.png) no-repeat 0 0;
overflow: hidden;
position: absolute;
margin-left: 0;
top: -7px;
border-style: none;
cursor: help;
}