# 移动设备上未应用CSS修改

**URL:** <https://meta.discourse.org/t/css-edits-not-being-applied-on-mobile/353986>\
**Category:** Support\
**Tags:** css\
**Created:** [2025年二月23日 18:58 UTC](https://meta.discourse.org/t/css-edits-not-being-applied-on-mobile/353986 "2025-02-23T18:58:32Z")\
**Posts on this page:** 1\
**Showing post:** 1

<div class="post-metadata">

**Author:** ![Richie](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/richie/32/115110_2.png) [@Richie](https://meta.discourse.org/u/Richie)\
**Post date:** [2025年二月23日 18:58 UTC](https://meta.discourse.org/t/css-edits-not-being-applied-on-mobile/353986/1 "2025-02-23T18:58:32Z")

</div>

我很想知道是否有人能帮我处理一些 CSS 问题。

我一直在关注 [Making custom CSS changes on your site](https://meta.discourse.org/t/making-custom-css-changes-on-your-site/168101) 指南，我所做的更改在桌面端生效，但在移动端却无效。

在这个例子中，我想隐藏用户个人资料页面和用户个人资料卡中的“位置”信息。

我在 `CSS > Common` 中应用了以下代码：

```css
/* Hide the User Location from their public profile page */
.user-profile-location {
  display: none;
}
/* Hide the User Location from their user card */
.user-card .location-and-website .location {
  display: none;
}

```

在 macOS 笔记本电脑的 Safari 和 Chrome 上测试，两者都已隐藏：

 ![Screenshot 2025-02-23 at 18.52.47](https://global.discourse-cdn.com/meta/original/4X/9/6/4/96481f013dcd98b419e90e5e4315f69dd3f0827b.jpeg)

在 iPhone 的 Safari 和 Chrome 上测试，两者仍然非常明显 🤔

 ![IMG_2192.PNG](https://global.discourse-cdn.com/meta/original/4X/0/4/9/049c62e11696023f413001292ea30d8783e10047.jpeg)

如上所述，这是多个浏览器上的情况。

同样，我也使用此 CSS 来隐藏其公共个人资料中的一些自定义用户字段：

```css
/* Hide the social media platforms from the lower part of their public profile page */
.instagram, .tik-tok, .facebook, .you-tube, .x-\\(twitter\\), .vimeo {
    display: none;
}

```

以及从用户卡中隐藏：

```css
/* Hide the social media platforms from the lower part of their user card */
.public-user-field __you-tube, .public-user-field__ vimeo, .public-user-field __instagram, .public-user-field__ x-\\(twitter\\), .public-user-field __facebook, .public-user-field__ tik-tok {
    display: none;
}

```

但这些在移动端（个人资料和卡片上）仍然可见 🤔

有人能看出我哪里做错了什么吗？ 🤷

---

_[View the full topic](https://meta.discourse.org/t/css-edits-not-being-applied-on-mobile/353986)._
