如何自定义滚动? [英] how to customise custom scroll?

查看:125
本文介绍了如何自定义滚动?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想让我的滚动有一个透明的背景,滚动是一个轻微的白色破折号,并在顶部有一个向上的箭头和向下的箭头...这是我目前的自定义。它给了我一个灰色的长卷轴...但我不知道要编辑什么改变它?

I want my scroll to have a transparent background, for the scroll to be a slight white dash and have a up arrow and down arrow at the top...this is how i am customising at the moment. It gives me a grey long scroll...but i dont know what to edit to change it?

    ::-webkit-scrollbar {
    width: 10px;
    height: 6px;
}

::-webkit-scrollbar-button:start:decrement,
::-webkit-scrollbar-button:end:increment {
    height: 30px;
    display: block;
    background-color: transparent;
}

::-webkit-scrollbar-track-piece {
    background-color: transparent;
    -webkit-border-radius: 6px;
}

::-webkit-scrollbar-thumb:vertical {
    height: 50px;
    background-color: #666;
    -webkit-border-radius: 6px;
}

::-webkit-scrollbar-thumb:horizontal {
    width: 50px;
    background-color: #666;
    -webkit-border-radius: 3px;
}


推荐答案

,这里有三个jQuery插件,在所有浏览器的自定义滚动条上做得很好:

Answered a question like this before, here are three jQuery plugins that do a good job at custom scrollbars across all browsers:

  • jScrollpane
  • jQueryUI slider plugin
  • and jQuery SlimScroll

这篇关于如何自定义滚动?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆