# 如何在网站顶部设置可关闭的横幅？

**URL:** https://meta.discourse.org/t/how-to-set-a-closable-banner-at-the-top-of-site/226302
**Category:** Support
**Created:** [2022 年5 月 6 日 09:29 UTC](https://meta.discourse.org/t/how-to-set-a-closable-banner-at-the-top-of-site/226302 "2022-05-06T09:29:46Z")
**Posts on this page:** 1
**Showing post:** 2

<div class="post-metadata">

### Author: ![ondrej](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/ondrej/32/198804_2.png) [@ondrej](https://meta.discourse.org/u/ondrej)
#### Post date: [2022 年5 月 6 日 11:21 UTC](https://meta.discourse.org/t/how-to-set-a-closable-banner-at-the-top-of-site/226302/2 "2022-05-06T11:21:37Z")

</div>

👋 有几种方法可以做到这一点。

1. 创建一个横幅主题

转到主题管理 🔧 并选择 📌 Pin Topic 并选择“创建横幅主题”

 ![image](https://global.discourse-cdn.com/meta/original/4X/e/2/0/e200de8fff5f05b9ac0c98058d01c40ee8889ad3.png)

1. 使用多功能横幅主题组件。我相信 Meta 横幅是基于此的。有一个可配置的横幅版本 [Welcome Link Banner](https://meta.discourse.org/t/welcome-link-banner/218743)

> [@Versatile Banner](https://meta.discourse.org/t/versatile-banner/109133):
>
> discourse2Summary Versatile Banner adds a customizable banner to your site.eyeglassesPreview [Preview on Discourse Theme Creator](https://discourse.theme-creator.io/theme/Discourse/versatile-banner)hammer_and_wrenchRepository Link [https://github.com/discourse/discourse-versatile-banner](https://github.com/discourse/discourse-versatile-banner)open_bookNew to Discourse Themes? [Beginner’s guide to using Discourse Themes](https://meta.discourse.org/t/beginners-guide-to-using-discourse-themes/91966) Install this theme component Features This theme component is an evolution of previous banner efforts. The goal is to provide more ease and flexibility through the use…

如果您在安装主题组件方面需要更多帮助，请参阅此主题 [Installing a theme or theme component](https://meta.discourse.org/t/how-do-i-install-a-theme-or-theme-component/63682)

希望这有帮助 😃

---

_[View the full topic](https://meta.discourse.org/t/how-to-set-a-closable-banner-at-the-top-of-site/226302)._
