# 在横幅内添加图片？

**URL:** https://meta.discourse.org/t/adding-image-within-the-banner/270600
**Category:** Development
**Tags:** welcome-link-banner
**Created:** [2023年四月28日 11:55 UTC](https://meta.discourse.org/t/adding-image-within-the-banner/270600 "2023-04-28T11:55:26Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![Michele\_Butturini](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/michele_butturini/32/295242_2.png) [@Michele\_Butturini](https://meta.discourse.org/u/Michele_Butturini)
#### Post date: [2023年四月28日 11:55 UTC](https://meta.discourse.org/t/adding-image-within-the-banner/270600/1 "2023-04-28T11:55:26Z")

</div>

这是一个很棒的功能！

您知道是否/如何可以在横幅中添加图片吗？

类似这样：

 ![Screenshot 2023-04-28 at 13.50.45](https://global.discourse-cdn.com/meta/original/4X/4/6/c/46c55dd3c755ba1f2844b3f25cf9c5fce112c2fc.png)

---

<div class="post-metadata">

### Author: ![Canapin](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/canapin/32/119591_2.png) [@Canapin](https://meta.discourse.org/u/Canapin)
#### Post date: [2023年四月28日 12:15 UTC](https://meta.discourse.org/t/adding-image-within-the-banner/270600/2 "2023-04-28T12:15:38Z")

</div>

欢迎您，@Michele_Butturini 👋

> [@Michele\_Butturini](#):
>
> 您知道是否/如何可以在横幅中添加图片吗？

通过将您的图片文件和几行 CSS 添加到您的主题或新的自定义组件中，可以相对轻松地完成此操作：

 ![image](https://global.discourse-cdn.com/meta/original/4X/5/7/c/57c74d99430e0b3b5483a554bb369e288ffda366.png)

```css
.welcome-wrapper {
    flex-wrap: wrap;
    
    &:before {
        content: "";
        background: url($welcome-banner-image);
        height: 100px;
        width: 100%;
    }
}

```

 ![image](https://global.discourse-cdn.com/meta/original/4X/2/2/6/22610040109e58f83eddc1b6758e6ceea7c839f4.jpeg)

---

<div class="post-metadata">

### Author: ![system](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/system/32/443519_2.png) [@system](https://meta.discourse.org/u/system)
#### Post date: [2023年七月5日 06:34 UTC](https://meta.discourse.org/t/adding-image-within-the-banner/270600/3 "2023-07-05T06:34:54Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
