# 如何隐藏主页上的“最新”、“热门”、“分类”和下拉菜单

**URL:** <https://meta.discourse.org/t/how-to-hide-the-latest-top-categories-and-drop-down-in-the-homepage/177088>\
**Category:** Support\
**Created:** [2021年一月24日 07:23 UTC](https://meta.discourse.org/t/how-to-hide-the-latest-top-categories-and-drop-down-in-the-homepage/177088 "2021-01-24T07:23:28Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![AmzDis](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/amzdis/32/206482_2.png) [@AmzDis](https://meta.discourse.org/u/AmzDis)\
**Post date:** [2021年一月24日 07:23 UTC](https://meta.discourse.org/t/how-to-hide-the-latest-top-categories-and-drop-down-in-the-homepage/177088/1 "2021-01-24T07:23:28Z")

</div>

大家好，我们的网站 [https://amzdis.com](https://amzdis.com)（Amazon Discount）希望在首页隐藏“最新”、“热门”和“分类”部分。在设置的“自定义”中应该添加什么 CSS？

请查看桌面截图

 ![25d73bf70e7ccae30752855af89b0db](https://global.discourse-cdn.com/meta/original/3X/a/a/aa39b4086d3cddba874f3f4ec358bb95bcacc692.jpeg)

请查看移动设备截图

 ![233b2133023cdda2384305f90ea4f5f](https://global.discourse-cdn.com/meta/original/3X/c/c/cc92362688f60f1b72c9571cf7fc6044c2b54d83.jpeg)

---

<div class="post-metadata">

**Author:** ![AmzDis](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/amzdis/32/206482_2.png) [@AmzDis](https://meta.discourse.org/u/AmzDis)\
**Post date:** [2021年一月24日 08:07 UTC](https://meta.discourse.org/t/how-to-hide-the-latest-top-categories-and-drop-down-in-the-homepage/177088/2 "2021-01-24T08:07:09Z")

</div>

我添加了以下自定义 CSS，仅能在桌面端首页隐藏下拉列表，但在移动端下拉列表仍然显示。

```
.navigation-topics ol.category-breadcrumb {
display: none;}

```

桌面端下拉列表已消失。

 ![e34116ed716db5695eb4187afc638fc](https://global.discourse-cdn.com/meta/original/3X/c/a/ca8322262fe8f08505caa723036dd45111b86e55.jpeg)

但下拉列表在移动端仍然显示。

 ![21ac254fca4d4fdb56b37d9d5567913](https://global.discourse-cdn.com/meta/original/3X/a/c/acb03bb8f167c46c2afe291f98a2c7e5b342bc36.jpeg)

---

<div class="post-metadata">

**Author:** ![Jonathan5](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jonathan5/32/197134_2.png) [@Jonathan5](https://meta.discourse.org/u/Jonathan5)\
**Post date:** [2021年一月24日 12:36 UTC](https://meta.discourse.org/t/how-to-hide-the-latest-top-categories-and-drop-down-in-the-homepage/177088/3 "2021-01-24T12:36:55Z")

</div>

我认为您需要使用此站点设置。

### 顶部菜单

确定哪些项目出现在首页导航中，以及它们的显示顺序。例如：latest|new|unread|categories|top|read|posted|bookmarks

---

<div class="post-metadata">

**Author:** ![AmzDis](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/amzdis/32/206482_2.png) [@AmzDis](https://meta.discourse.org/u/AmzDis)\
**Post date:** [2021年一月24日 12:45 UTC](https://meta.discourse.org/t/how-to-hide-the-latest-top-categories-and-drop-down-in-the-homepage/177088/4 "2021-01-24T12:45:22Z")

</div>

谢谢，Jonathan5。

你说得对。

 ![fd232598d874a6fcf6505a28de82c80](https://global.discourse-cdn.com/meta/original/3X/4/d/4d1e48c707f0a15b18f04559745129cc9f918fbf.png)

在我设置顶部菜单后，它必须包含一个值为“latest”的选项。

我该如何在首页隐藏“latest”选项，因为“latest”是唯一的选择，也是默认话题？

 ![5f3962c53ccb80e3fa21d77ec4eb80b](https://global.discourse-cdn.com/meta/original/3X/0/5/05290d173795f9cd9bfee5dc315f0806ed8c22ab.png)

---

<div class="post-metadata">

**Author:** ![Jonathan5](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jonathan5/32/197134_2.png) [@Jonathan5](https://meta.discourse.org/u/Jonathan5)\
**Post date:** [2021年一月24日 12:51 UTC](https://meta.discourse.org/t/how-to-hide-the-latest-top-categories-and-drop-down-in-the-homepage/177088/5 "2021-01-24T12:51:40Z")

</div>

我不确定，但猜是 CSS。通常移动端的 CSS 和桌面端的 CSS 是不同的。你的桌面浏览器可能有一个按钮可以模拟移动设备，从而查看 CSS 类或 ID。

---

<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:** [2021年一月24日 15:18 UTC](https://meta.discourse.org/t/how-to-hide-the-latest-top-categories-and-drop-down-in-the-homepage/177088/6 "2021-01-24T15:18:54Z")

</div>

桌面端

```plaintext
.nav-pills>li a.active {
    color: var(--secondary);
    background-color: var(--quaternary);
    display: none;
}

```

移动端

```plaintext
.list-controls .nav-pills .navigation-toggle {
    flex: 0 1 auto;
    display: none;
}

```

---

<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:** [2021年二月23日 15:19 UTC](https://meta.discourse.org/t/how-to-hide-the-latest-top-categories-and-drop-down-in-the-homepage/177088/7 "2021-02-23T15:19:41Z")

</div>

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