Linux 软件免费装

Gredich Smooth Scroll

开发者 gredich
diarpu
更新时间 2026年7月16日 02:02
PHP版本: 7.4 及以上
WordPress版本: 7.0
版权: GPLv2 or later
版权网址: 版权信息

标签

scroll scrolling smooth lenis smooth-scroll

下载

1.0.0

详情介绍:

Adds Lenis library for smooth scrolling with a full settings page — no coding required. Unlike headless wrappers, it includes: Features:

安装:

  1. Upload the gredich-smooth-scroll folder to the /wp-content/plugins/ directory
  2. Activate the plugin through the 'Plugins' menu in WordPress
  3. Go to Settings > Gredich Smooth Scroll to configure the plugin

常见问题:

How do I exclude an element from smooth scrolling?

There are two ways:

  1. Using data attributes (recommended): Add data-lenis-prevent attribute to any HTML element you want to exclude. For finer control, use:
| Attribute | Description | |---|---| | data-lenis-prevent | Prevent all smooth scroll events | | data-lenis-prevent-wheel | Prevent wheel events only | | data-lenis-prevent-touch | Prevent touch events only | | data-lenis-prevent-vertical | Prevent vertical scroll events only | | data-lenis-prevent-horizontal | Prevent horizontal scroll events only | 2. Using the settings page: Go to Settings > Gredich Smooth Scroll and add the element's ID or class to the exclusion list.

What is the difference between ID and class selectors?

  • ID selectors start with # (e.g., #my-element)
  • Class selectors start with . (e.g., .my-class)

Can I use both methods together?

Yes! You can combine data attributes with ID/class exclusions.

How does the plugin handle nested scroll elements?

By default, the plugin automatically detects nested scrollable elements and lets them scroll natively. You can control this behavior from Settings > Gredich Smooth Scroll using the "Allow Nested Scroll" option.

  • Enabled (default): Lenis detects nested scroll containers automatically. Best for most sites.
  • Disabled: Disable only if you experience performance issues and prefer to manually exclude elements using the data attributes or exclusion list above.

更新日志:

1.0.0