Title: Custom Scrollbar
Author: miunosoft
Published: <strong>2015 年 7 月 4 日</strong>
Last modified: 2021 年 7 月 9 日

---

搜索插件

![](https://ps.w.org/custom-scrollbar/assets/banner-772x250.png?rev=1269059)

**该插件尚未通过WordPress的最新3个主要版本进行测试**。 当与较新版本的WordPress一起
使用时，可能不再受到维护或支持，并且可能会存在兼容性问题。

![](https://ps.w.org/custom-scrollbar/assets/icon-256x256.png?rev=1269039)

# Custom Scrollbar

 作者：[miunosoft](https://profiles.wordpress.org/miunosoft/)

[下载](https://downloads.wordpress.org/plugin/custom-scrollbar.1.3.8.zip)

 * [详情](https://cn.wordpress.org/plugins/custom-scrollbar/#description)
 * [评价](https://cn.wordpress.org/plugins/custom-scrollbar/#reviews)
 *  [安装](https://cn.wordpress.org/plugins/custom-scrollbar/#installation)
 * [开发进展](https://cn.wordpress.org/plugins/custom-scrollbar/#developers)

 [支持](https://wordpress.org/support/plugin/custom-scrollbar/)

## 描述

#### Change the Look of Too Long Vertical Elements width a Scrollbar

Do you have too long elements sticking out and breaking the web site layout?

If you have such a problem, fix their height by adding a scrollbar to the element
with this plugin.

#### See How a Scrollbar is Created

After installing it, go to `Dashboard` -> `Appearance` -> `Scrollbars`. Set a selector
and height. That’s it.

Notes: you need a basic understanding of CSS/jQuery selectors to use this plugin.

#### Multiple Selectors

By specifying selectors, you can define multiple scrollbars.

#### Responsive

Supports responsive design by defining the range of browser screen widths for the
scrollbar to appear.

#### 自定义颜色

Pick custom colors for the scrollbar elements.

#### 自定义 CSS

Define custom CSS rules.

#### Predefined Styles

Pick you favorite style from a list.

#### Ajax Page Load Handling

Even if the elements is inside an element which loads with Ajax, your scrollbars
will be initialized accordingly.

#### Supports Responsive Design

If you want to disable your scrollbars in certain screen widths, you can do so as
well.

#### Supported Language

 * 英文
 * Japanese

## 屏幕截图

 * [[
 * **Front-end**
 * [[
 * **Setting Page**

## 安装

 1. Upload **`custom-scrollbar.php`** and other files compressed in the zip folder 
    to the **`/wp-content/plugins/`** directory.
 2. 通过WordPress的“插件”菜单激活插件。
 3. Go to **Dashboard** -> **Appearance** -> **Scrollbars**.
 4. Configure the options by setting a selector and height.

## 评价

![](https://secure.gravatar.com/avatar/49859f7f4294487dfe8a3f65a6b5193a3820cdaa843ea82b1c60653935615f53?
s=60&d=retro&r=g)

### 󠀁[Comprehensive Functionality](https://wordpress.org/support/topic/comprehensive-functionality/)󠁿

 [mojen](https://profiles.wordpress.org/mojen/) 2017 年 8 月 20 日

Plugin’s UI allows access to all customisation features. Each option is extremely
well-documented. Settings are nicely organised.

![](https://secure.gravatar.com/avatar/147f9bad2fe3bfcd2d04c70b5f4504dc03b2ba51be99369fa8ec498f193b114b?
s=60&d=retro&r=g)

### 󠀁[Needs Improvement](https://wordpress.org/support/topic/needs-improvement-12/)󠁿

 [adaldesign](https://profiles.wordpress.org/adaldesign/) 2017 年 1 月 16 日 1 回复

When loading the plugin directory URL use plugins_url() instead of WP_PLUGIN_URL
Eg: define(‘file_url’,plugins_url().”/your_file/”); Source: plugin-main.php, line#
21 Because WP_PLUGIN_URL doesn’t work on SSL properly, so this caused a delay in
the launch of our website.

![](https://secure.gravatar.com/avatar/52bc66d3d316b886dcb79ef42f808e40e789b0ca263e3e839cb196a912c98069?
s=60&d=retro&r=g)

### 󠀁[Scroll speed to too slow](https://wordpress.org/support/topic/scroll-speed-to-too-slow/)󠁿

 [gincegeorge](https://profiles.wordpress.org/gincegeorge/) 2016 年 11 月 29 日

Please add an option to control scroll speed.

![](https://secure.gravatar.com/avatar/9fd6240f7a71ae600e56310e44673b568f319a0c03adad363a5fba78e84a8e36?
s=60&d=retro&r=g)

### 󠀁[Awesome Plugin](https://wordpress.org/support/topic/awesome-plugin-2150/)󠁿

 [wapeddell](https://profiles.wordpress.org/wapeddell/) 2016 年 9 月 3 日

Awesome Plugin thanks for making this available for free.

![](https://secure.gravatar.com/avatar/7d36c16a5f052707c4fed77899fd07b9e7f775b1b9bed784defb84f66d081dcc?
s=60&d=retro&r=g)

### 󠀁[This plugin is awesome!](https://wordpress.org/support/topic/this-plugin-is-awesome-40/)󠁿

 [HelloHydra](https://profiles.wordpress.org/hellohydra/) 2016 年 9 月 3 日

Really didn’t expect a plugin for this kind of thing to work right off the bat. 
Neat, simple, intuitive & effective. Thanks a lot, dev!

![](https://secure.gravatar.com/avatar/433bf5fded873cd11d4665bb85d8dccc9bdfdbe20aec6c174e48877cb222c377?
s=60&d=retro&r=g)

### 󠀁[Where is it?](https://wordpress.org/support/topic/where-is-it-16/)󠁿

 [shughey](https://profiles.wordpress.org/shughey/) 2016 年 9 月 3 日 1 回复

I’ve installed and set the options. Where is it? Is there supposed to be a shortcode?
Have I missed something?

 [ 阅读所有7条评价 ](https://wordpress.org/support/plugin/custom-scrollbar/reviews/)

## 贡献者及开发者

「Custom Scrollbar」是开源软件。 以下人员对此插件做出了贡献。

贡献者

 *   [ miunosoft ](https://profiles.wordpress.org/miunosoft/)
 *   [ Michael Uno ](https://profiles.wordpress.org/michael-uno/)

[帮助将「Custom Scrollbar」翻译成简体中文。](https://translate.wordpress.org/projects/wp-plugins/custom-scrollbar)

### 对开发感兴趣吗?

您可以[浏览代码](https://plugins.trac.wordpress.org/browser/custom-scrollbar/)，
查看[SVN仓库](https://plugins.svn.wordpress.org/custom-scrollbar/)，或通过[RSS](https://plugins.trac.wordpress.org/log/custom-scrollbar/?limit=100&mode=stop_on_copy&format=rss)
订阅[开发日志](https://plugins.trac.wordpress.org/log/custom-scrollbar/)。

## 更新日志

#### 1.3.8 – 07/09/2021

 * Fixed a bug that caused a PHP syntax error in PHP below 7.3.

#### 1.3.7 – 07/09/2021

 * Fixed dynamic UI elements which did not toggle the visibility.
 * Fixed JQMIGRATE warnings in the browser console.

#### 1.3.6 – 03/01/2021

 * Fixed an incompatibility issue with PHP 8.0, which the setting UI did not load.
 * Fixed an incompatibility issue with WordPress 5.6 which comes with jQuery 3.5.

#### 1.3.5 – 11/19/2020

 * Added a custom JavaScript event that is triggered right after a scrollbar is 
   initialized.
 * Fixed some non-sanitized raw HTTP request arrays handled when the setting form
   is submitted.

#### 1.3.4 – 11/06/2020

 * Tweaked the style of some UI elements.
 * Fixed a bug of double slashes on resource URLs.
 * Fixed a bug that scrollbar options were not passed properly when the target element
   is not found.
 * Fixed a bug that the default options were not applied properly.

#### 1.3.3 – 08/19/2020

 * Fixed an incompatibility issue with WordPress 5.5 regarding radio input buttons.

#### 1.3.2 – 01/10/2019

 * Added the Japanese translation.
 * Added the default language template file.

#### 1.3.1 – 12/27/2016

 * Fixed a bug that debug log was shown in the browser console.

#### 1.3.0 – 12/16/2016

 * Added the `Scroll Buttons`, `Keyboard`, `Mouse Wheel` options.
 * Changed the `Ajax Handling` option in the `General` setting section by moving
   it to each scrollbar option item.
 * Deprecated the ability of creating multiple scrollbars.

#### 1.2.0 – 10/10/2016

 * Added the `Ajax Handling` option that determines whether to initialize plugin
   scripts on Ajax page loads.
 * Added the ability to export and import settings.
 * Refined the setting pages.

#### 1.1.7 – 07/07/2016

 * Tweaked the setting UI to improve the usability.

#### 1.1.6 – 01/06/2016

 * Added the minified version for the enabler script.
 * Improved performance of the setting page.

#### 1.1.5 – 12/15/2015

 * Fixed an issue with jQuery v2.1.4.

#### 1.1.4 – 11/27/2015

 * Tweaked the setting pages.

#### 1.1.3 – 11/05/2015

 * Changed the required WordPress version to 3.4.
 * Fixed a bug that settings were not saved properly when removing a scrollbar definition
   item.

#### 1.1.2 – 10/29/2015

 * Tweaked the setting pages.
 * Fixed a bug that percentages for width and height could not be set.

#### 1.1.1 – 10/20/2015

 * Tweaked the setting pages.
 * Updated the [Admin Page Framework](https://wordpress.org/plugins/admin-page-framework/)
   library.

#### 1.1 – 08/29/2015

 * Added the ability to set inline CSS rules wit the `Inline CSS` option.
 * Tweaked the styling of setting forms.
 * Fixed a bug that the `Width` option did not take effect.

#### 1 – 07/05/2015

 * Released.

## 额外信息

 *  版本 **1.3.8**
 *  最后更新：**5 年前**
 *  活跃安装数量 **2,000+**
 *  WordPress 版本 ** 3.4 或更高版本 **
 *  已测试的最高版本为 **5.7.15**
 *  语言
 * [English (US)](https://wordpress.org/plugins/custom-scrollbar/)
 * 标签
 * [scroll](https://cn.wordpress.org/plugins/tags/scroll/)[scroll bar](https://cn.wordpress.org/plugins/tags/scroll-bar/)
   [scrollbar](https://cn.wordpress.org/plugins/tags/scrollbar/)[scrollbars](https://cn.wordpress.org/plugins/tags/scrollbars/)
 *  [高级视图](https://cn.wordpress.org/plugins/custom-scrollbar/advanced/)

## 评级

 4.7 星（最高 5 星）。

 *  [  6 条 5 星评价     ](https://wordpress.org/support/plugin/custom-scrollbar/reviews/?filter=5)
 *  [  0 条 4 星评价     ](https://wordpress.org/support/plugin/custom-scrollbar/reviews/?filter=4)
 *  [  1 条 3 星评价     ](https://wordpress.org/support/plugin/custom-scrollbar/reviews/?filter=3)
 *  [  0 条 2 星评价     ](https://wordpress.org/support/plugin/custom-scrollbar/reviews/?filter=2)
 *  [  0 条 1 星评价     ](https://wordpress.org/support/plugin/custom-scrollbar/reviews/?filter=1)

[Your review](https://wordpress.org/support/plugin/custom-scrollbar/reviews/#new-post)

[查看全部评论](https://wordpress.org/support/plugin/custom-scrollbar/reviews/)

## 贡献者

 *   [ miunosoft ](https://profiles.wordpress.org/miunosoft/)
 *   [ Michael Uno ](https://profiles.wordpress.org/michael-uno/)

## 支持

有话要说吗？是否需要帮助？

 [查看支持论坛](https://wordpress.org/support/plugin/custom-scrollbar/)

## 捐助

您愿意支持这个插件的发展吗?

 [ 捐助此插件 ](http://en.michaeluno.jp/donate)