# 这段代码应该放在哪里用于顶部横幅？

**URL:** https://meta.discourse.org/t/where-shall-i-put-this-code-for-a-top-banner/300496
**Category:** Support
**Created:** [2024年三月22日 08:15 UTC](https://meta.discourse.org/t/where-shall-i-put-this-code-for-a-top-banner/300496 "2024-03-22T08:15:51Z")
**Posts on this page:** 1
**Showing post:** 8

<div class="post-metadata">

### Author: ![Lilly](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/lilly/32/575047_2.png) [@Lilly](https://meta.discourse.org/u/Lilly)
#### Post date: [2024年三月25日 04:59 UTC](https://meta.discourse.org/t/where-shall-i-put-this-code-for-a-top-banner/300496/8 "2024-03-25T04:59:56Z")

</div>

@Moin 刚刚提醒了我这件事：

> [@创建图像横幅](https://meta.discourse.org/t/create-a-an-image-banner/280279/2):
>
> 在主题组件中尝试此操作。在通用 CSS 中： #homepage-banner { width: 100%; height: 300px; } 您可以根据需要调整高度。 在通用横幅组件中，将以下内容放在图片周围，您可以在其中找到图片 URL，可能是在主标题内容字段中。 \<div id="homepage-banner"\> 将图片放在此处 \</div\> 您可以添加其他 CSS 代码以进行更多格式设置。您可以查看我网站上的通用横幅（请参阅个人资料），了解有关圆角和插入文本等其他格式设置的内容。

他们显然比我记性好 😛

---

_[View the full topic](https://meta.discourse.org/t/where-shall-i-put-this-code-for-a-top-banner/300496)._
