【问题标题】:scroll width is not change with css滚动宽度不随 css 改变
【发布时间】:2015-08-05 09:08:34
【问题描述】:

我尝试使用水平滚动的图片库制作 div。 我给出了滚动宽度 css 但它没有应用。背景颜色应用得很好。

在下面查看我的 css 代码:

            #scroll {
                margin:100px auto;
                overflow:auto;
                overflow-y: hidden;
                overflow-x: scroll;
                }
            #scroll::-webkit-scrollbar {
                    width: 6px !important;
                    background:#C9C5C5;
                }

当使用垂直滚动时,宽度应用得很好: { 溢出-x:隐藏; 溢出-y:自动; }

我希望你能帮助我。 非常感谢!

滚动宽度没有改为6px

【问题讨论】:

  • 你应用宽度了吗?

标签: css


【解决方案1】:

这是水平的所以你需要的不是'width'而是'height'
#scroll::-webkit-scrollbar { height: 6px !important; background:#C9C5C5; }

Example

【讨论】:

    猜你喜欢
    • 2013-02-15
    • 1970-01-01
    • 2014-06-25
    • 2012-08-31
    • 2016-06-25
    • 1970-01-01
    • 2017-10-30
    • 2015-02-16
    • 1970-01-01
    相关资源
    最近更新 更多