Title: Sticky Block for Gutenberg Editor
Author: Senff - a11n
Published: <strong>2020 年 1 月 29 日</strong>
Last modified: 2026 年 1 月 14 日

---

搜索插件

![](https://ps.w.org/sticky-block/assets/icon-256x256.png?rev=2235358)

# Sticky Block for Gutenberg Editor

 作者：[Senff – a11n](https://profiles.wordpress.org/senff/)

[下载](https://downloads.wordpress.org/plugin/sticky-block.1.11.1.zip)

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

 [支持](https://wordpress.org/support/plugin/sticky-block/)

## 描述

#### Summary

The Gutenberg Sticky Block can be added to any Post or Page and will be sticky as
soon as it hits the top of the page after you scroll down. The Sticky Block can 
contain any other Blocks (Paragraphs, Images, etc.), and can also be used _in_ other
Blocks (e.g. Column or Table).

The main principle is the same as my [Sticky Menu (Or Anything)](https://wordpress.org/support/plugin/sticky-menu-or-anything-on-scroll)
plugin, and the basic code of that plugin has been used in this Sticky Block plugin
as well. If you want to make anything sticky outside of the content area (e.g navigation
menu, widgets), use the _Sticky Menu (Or Anything)_ plugin instead of Sticky Block.

Featured BLOCK OF THE WEEK (Sep 16, 2021).

#### Features

 * **Any Block can be added inside the Sticky Block**: the Sticky Block works as
   a “wrapper” or “grouping” block, that can hold every other type of Block.
 * **The Sticky Block can be added inside other Blocks**: any block that works as
   a “wrapper” (such as the Columns Block or the Table Block) can also hold a Sticky
   Block.
 * **Positioning from top** (optional): you can add any amount of space between 
   the Sticky Block and the top of the page, so that the element is not always stuck
   at the “ceiling” of the page.
 * **Enable for certain screen sizes only** (optional): you can set a minimum and/
   or maximum screen size where the stickiness should work. This can be handy if
   you have a responsive site and you don’t want your Block to be sticky on smaller
   screens, for example.
 * **Push-up element** (optional): you can pick any other element lower on the page
   that will push the Sticky Block up again (for example a footer, or even another
   Sticky Block).
 * **Admin Bar aware**: checks if the current user has an Admin Toolbar at the top
   of the page. If it has, the Sticky Block will not obscure it (or be obscured 
   by it).
 * **Z-index**: in case there are other elements on the page that obscure or peek
   through your Sticky Block, you can add a Z-index easily. This will only be applied
   once the Block is sticky.

## 屏幕截图

[⌊Adding a Sticky Block⌉⌊Adding a Sticky Block⌉[

Adding a Sticky Block

[⌊A Sticky Block (containing a Media-Text Block) with all its options⌉⌊A Sticky 
Block (containing a Media-Text Block) with all its options⌉[

A Sticky Block (containing a Media-Text Block) with all its options

## 区块

该插件提供了 1 个区块.

 *   Sticky

## 安装

 1. Install Sticky Block from the WordPress Plugin Directory. Or, if that doesn’t work:
 2. Upload the “sticky-block” directory to your “wp-content/plugins” directory.
 3. In your WordPress admin, go to PLUGINS and activate “Sticky Block”
 4. When editing a Post or Page, find the Sticky Block in the Layout section of the
    available Blocks.
 5. Party!

## 常见问题

### Can I add more than one Sticky Block on a page?

Yes you can. Unlike the [Sticky Menu (Or Anything)](https://wordpress.org/support/plugin/sticky-menu-or-anything-on-scroll)
plugin (where you can select only one sticky element), the Sticky Block plugin will
let you add as many Sticky Blocks as you want.

### Is it possible to add some styles to the element but only when it’s sticky?

To add styles to your Block when it’s not sticky, use classname “.block-is-not-sticky”.

To add styles to your Block only when it’s sticky, use classname “.block-is-sticky”.

The following code would give your Block a red background only when it’s not sticky,
and blue only when it is:

.block-is-not-sticky {
 background: red; }

.block-is-sticky {
 background: blue; }

You may need to be more specific with your CSS, to override other default styles.

### I’ll need more help please!

Please go to the plugin’s [support forum on WordPress.org](https://wordpress.org/support/plugin/sticky-block)
and post a message (include a link to your site if possible).

### I need some functionality that the plugin currently doesn’t support. Can you help make a custom version?

I am currently not available for any custom work.

### How was this plugin made?

Sticky Block was created using the [Create Guten Block Toolkit](https://ahmadawais.com/create-guten-block-toolkit/)
by [Ahmad Awais](https://ahmadawais.com/).

## 评价

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

### 󠀁[Worst Experience ever have had](https://wordpress.org/support/topic/worst-experience-ever-have-had/)󠁿

 [casmingmasterjeccica](https://profiles.wordpress.org/casmingmasterjeccica/) 2025
年 4 月 17 日

Paid just for nothing. You should assist or give back out fund. contact: dealspees
@ g.m.a.i.l .c.o.m

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

### 󠀁[Exellent](https://wordpress.org/support/topic/exellent-161/)󠁿

 [tamnik](https://profiles.wordpress.org/tamnik/) 2024 年 4 月 5 日 1 回复

Excellent plugin! But is it dead?

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

### 󠀁[great!](https://wordpress.org/support/topic/great-15333/)󠁿

 [apteis](https://profiles.wordpress.org/apteis/) 2023 年 2 月 24 日

great and simple!

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

### 󠀁[Just cool](https://wordpress.org/support/topic/just-cool-9/)󠁿

 [haije](https://profiles.wordpress.org/haije/) 2022 年 12 月 11 日

I found this plugin from a Youtube tutorial and this is really cool. Maybe there
are other ways and plugins to do the same thing too, but I like the simplicity of
this. Thanks for the plugin!

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

### 󠀁[It works!](https://wordpress.org/support/topic/it-works-2209/)󠁿

 [marcomassimo](https://profiles.wordpress.org/marcomassimo/) 2021 年 12 月 11 日

Very simple and effective; it works with Blocksy theme

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

### 󠀁[Well it does what it does](https://wordpress.org/support/topic/almost-there-53/)󠁿

 [alstrar](https://profiles.wordpress.org/alstrar/) 2021 年 12 月 10 日 2 回复

Edit: I went for the everything sticky that main one by the same dev and it worked.
However I later decided not to use sticky on my site anyways. (Old review) I’d say
this works in all things except one, it’s not on top and when I scroll down it fades
behind many of the other things displayed on the site configuration that I currently
run. It was so close to perfection. I would have put five stars but for this I give
three.

 [ 阅读所有11条评价 ](https://wordpress.org/support/plugin/sticky-block/reviews/)

## 贡献者及开发者

「Sticky Block for Gutenberg Editor」是开源软件。 以下人员对此插件做出了贡献。

贡献者

 *   [ Senff – a11n ](https://profiles.wordpress.org/senff/)

「Sticky Block for Gutenberg Editor」插件已被翻译至 7 种本地化语言。 感谢[所有译者](https://translate.wordpress.org/projects/wp-plugins/sticky-block/contributors)
为本插件所做的贡献。

[帮助将「Sticky Block for Gutenberg Editor」翻译成简体中文。](https://translate.wordpress.org/projects/wp-plugins/sticky-block)

### 对开发感兴趣吗?

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

## 更新日志

#### 1.11.1

 * Adjusted some code to better adhere to plugin standards.

#### 1.11

 * Minor bug fix (thanks to @brogr for reporting)
 * WP 6.0 compatibility

#### 1.1

 * WP 5.9 compatibility

#### 1.0

 * Initial release of the plugin

## 额外信息

 *  版本 **1.11.1**
 *  最后更新：**5 月前**
 *  活跃安装数量 **7,000+**
 *  WordPress 版本 ** 5.0 或更高版本 **
 *  已测试的最高版本为 **6.9.4**
 *  语言
 * [Bengali (Bangladesh)](https://bn.wordpress.org/plugins/sticky-block/) 、 [Chinese (China)](https://cn.wordpress.org/plugins/sticky-block/)、
   [Danish](https://da.wordpress.org/plugins/sticky-block/) 、 [English (US)](https://wordpress.org/plugins/sticky-block/)、
   [Japanese](https://ja.wordpress.org/plugins/sticky-block/) 、 [Spanish (Chile)](https://cl.wordpress.org/plugins/sticky-block/)、
   [Spanish (Mexico)](https://es-mx.wordpress.org/plugins/sticky-block/) 和 [Spanish (Spain)](https://es.wordpress.org/plugins/sticky-block/).
 *  [翻译成简体中文](https://translate.wordpress.org/projects/wp-plugins/sticky-block)
 * 标签
 * [gutenberg](https://cn.wordpress.org/plugins/tags/gutenberg/)[sticky](https://cn.wordpress.org/plugins/tags/sticky/)
   [sticky block](https://cn.wordpress.org/plugins/tags/sticky-block/)
 *  [高级视图](https://cn.wordpress.org/plugins/sticky-block/advanced/)

## 评级

 4.6 星（最高 5 星）。

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

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

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

## 贡献者

 *   [ Senff – a11n ](https://profiles.wordpress.org/senff/)

## 支持

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

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

## 捐助

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

 [ 捐助此插件 ](https://donate.senff.com)