【问题标题】:CSS how to make select option come before a slider?CSS如何使选择选项出现在滑块之前?
【发布时间】:2018-04-18 09:36:04
【问题描述】:

我正在使用选择库 http://github.hubspot.com/select/ 和 noUiSlider https://refreshless.com/nouislider/。我面临的问题如下图所示

我已将“select”的选项更改为“select-theme-default.css”的默认样式,并在“noUislider.js”的帮助下创建滑块。滑块的 z 索引高于选项,我想要改变它。我尝试将“.select-option”类的 z-index 更改为 5,并尝试将“.noUi-connect”类更改为 2。但它不起作用。当我检查“.noUi-connect”并完全删除 z-index 属性时,它在某种程度上是有效的。

【问题讨论】:

  • 能否提供select和slider的css?
  • @AashiqRathnadas 那会更长。要不要给github的链接?
  • 只需要 .select-option 的值,如果不行,则移至 git

标签: css nouislider tether


【解决方案1】:

尝试更改 css(替换下面的 css)

.select.select-theme-default {
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    -o-user-select: none;
    user-select: none;
    position: relative;
    z-index: 99;
}

或者你可以覆盖它

位置:相对; z-index:99;

这里是新添加的

【讨论】:

    猜你喜欢
    • 2020-11-04
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多