【问题标题】:Increase jQuery Mobile slider handle's clickable area增加 jQuery Mobile 滑块手柄的可点击区域
【发布时间】:2015-11-25 09:23:31
【问题描述】:

我想增加 jQuery 移动滑块的手柄可点击区域。截至目前,手柄的可点击区域很小。因此,我无法每次都点击并更改手柄的范围。我希望手柄大小相同但增加可点击区域。我的自定义 CSS 如下。

.ui-slider-track .ui-btn.ui-slider-handle {
  width: 12px;
  height: 12px;
  margin: -10px 0 0 -10px;
  background-color:#0096E2;
  padding: 5px;
  border-color: #0096E2;
}

【问题讨论】:

    标签: javascript jquery html css jquery-mobile


    【解决方案1】:

    div {
      position: relative;
      width: 100px;
      height: 100px;
      border: 1px dashed #eee;
      cursor: pointer;
      transition: background-color 1.5s;
    }
    
    div::before {
      content: '';
      display: block;
      position: absolute;
      top: 50%;
      left: 50%;
      transform: translate(-50%, -50%);
      width: 20px;
      height: 20px;
      background-color: rgb(188,20,20);
      border-radius: 2px;
    }
    
    div:hover {
      background-color: #FFFFDF;
    }
    <div></div>

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2013-10-15
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多