【问题标题】:How do I hide "What to Watch" on YouTube using CSS?如何使用 CSS 在 YouTube 上隐藏“观看内容”?
【发布时间】:2014-07-19 20:55:11
【问题描述】:

我使用 Stylish 自定义我的 YouTube 主页(订阅)的外观。在http://www.youtube.com/feed/subscriptions,我想隐藏“观看内容”选项卡。

这是我找到的。

<span class="yt-uix-button-content">What to Watch </span>

如果我只使用这个:
.yt-uix-button-content{ display:none; }
它也隐藏了“上传”按钮。

有没有办法在代码中包含“观看内容”文本,还是不可能?

【问题讨论】:

    标签: html css youtube


    【解决方案1】:

    你必须使用 CSS 路径和​​ ":first-child" :

    body div#appbar-content div#appbar-nav li:first-child span.yt-uix-button-content{
        display:none;
    }
    

    CSS :first-child pseudo-element - W3Schools

    【讨论】:

      【解决方案2】:

      这个稍微具体一点的 CSS 选择器对我有用:

      #appbar-nav span.yt-uix-button-content { display: none }
      

      【讨论】:

        猜你喜欢
        • 2012-03-10
        • 2020-08-31
        • 2021-07-11
        • 2011-06-16
        • 2012-09-17
        • 1970-01-01
        • 2018-11-21
        • 1970-01-01
        • 2015-10-03
        相关资源
        最近更新 更多