12.3. 选项 A:CSS


例如,尝试从 Dashboard 页面隐藏最新的元素。在第一步中,您将其 CSS 路径识别为:

#three-scale .dashboard_bubble

请记住,这是第二个框,它具有相同的路径,因此您将使用"+"选择器。现在,您的路径如下:

.main_layout #three-scale .dashboard_bubble + .dashboard_bubble
/* or */
.main_layout #three-scale .dashboard_bubble:nth-child(1)

将 display 属性改为 none 使该框不可见:

.main_layout #three-scale .dashboard_bubble:nth-child(1) {
  display: none;
}
Red Hat logoGithubRedditYoutubeTwitter

学习

尝试、购买和销售

社区

关于红帽文档

通过我们的产品和服务,以及可以信赖的内容,帮助红帽用户创新并实现他们的目标。

让开源更具包容性

红帽致力于替换我们的代码、文档和 Web 属性中存在问题的语言。欲了解更多详情,请参阅红帽博客.

關於紅帽

我们提供强化的解决方案,使企业能够更轻松地跨平台和环境(从核心数据中心到网络边缘)工作。

© 2024 Red Hat, Inc.