1

I am trying to put a tour widget on my band's website and I've used CSS to modify a CSS element by the ID. Normally I can just call its class and it will override, but this element only has an ID.

If you've ever seen the songkick widget, the "By Songkick" part at the top is what I'm trying to get rid of. It's ID is "powered" but when I override with #powered or .powered, it doesn't change.

I've been doing:

#powered {
    display: none;
}

And nothing comes of it. It's not showing in the hierarchy of CSS in Chrome.

Is there another way to modify CSS by ID or do you think it's because the whole widget loads after my webpage and it overrides my changes? Is there such a thing as privatizing your CSS objects?

4

1 回答 1

4

(完全披露:我为 Songkick 工作,并曾在巡演日期小部件上工作)

Songkick 小部件由具有一些归属要求的 Songkick API 提供支持:https ://www.songkick.com/developer/api-terms-of-use - 如果这些要求对您来说是一个交易破坏者,您将可能不得不考虑另一种解决方案;(。

澄清为什么您的 CSS 不隐藏该元素:该小部件通过注入指向 Songkick 控制域的 iframe 来工作。因此,您需要在 iframe 中提供的 Songkick 页面上有 CSS,才能应用 CSS 规则。鉴于 Songkick 控制 iframe 内容,并且需要归因以支持第三方网站上的巡演日期,因此隐藏“by Songkick”不太可能很快成为小部件嵌入的选项。

于 2015-08-23T15:20:41.760 回答