# 分类图片高度 / 主题变量的通用理解

**URL:** <https://meta.discourse.org/t/category-image-heights-general-understanding-of-theme-variables/138312>\
**Category:** Product Support\
**Created:** [2020 年1 月 11 日 11:08 UTC](https://meta.discourse.org/t/category-image-heights-general-understanding-of-theme-variables/138312 "2020-01-11T11:08:40Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

作者： ![Johani](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/johani/32/176920_2.png) [@Johani](https://meta.discourse.org/u/Johani)\
发布日期： [2020 年1 月 11 日 11:35 UTC](https://meta.discourse.org/t/category-image-heights-general-understanding-of-theme-variables/138312/2 "2020-01-11T11:35:00Z")

</div>

我不太确定您想实现什么目标，但如果您只是想调整 Logo 的大小，这里有一些可以帮您起步的内容。

分类 Logo 默认会在几个地方使用——在分类页面和特定分类页面上。

如果您想同时修改这两个位置的 Logo 大小，可以使用以下代码：

```scss
@supports (--custom: property) {
  .category-logo.aspect-image {
    --max-height: 200px; // 将 200 更改为您需要的高度
  }
}

```

修改 `--max-height` 变量后，宽度应会自动调整。

如果您有更具体的需求，例如仅修改分类页面上的 Logo 大小，请检查您网站的 `desktop_category_page_style` 站点设置，并告诉我它的当前值。

如果您希望更改仅在桌面端生效，请将上述 CSS 添加到您主题的桌面 CSS 选项卡中；如果仅在移动端生效，请添加到移动端 CSS 选项卡中；如果希望在桌面端和移动端都生效，请将其添加到通用 CSS 选项卡中。

---

_[View the full topic](https://meta.discourse.org/t/category-image-heights-general-understanding-of-theme-variables/138312)._
