2014-02-09 86 views
0

我試圖從嵌入的Soundcloud播放器中刪除Cookie策略。 在Firebug中這是沒有問題的,我只是將「display:none」添加到.cookiePolicy中,並且它消失了。 但是,當我將此添加到我的wordpress css中時,沒有任何反應。從Soundcloud上的iframe中刪除元素

以下是我從另一篇文章中發現:

http://jsbin.com/nexup/1/edit?html,css,js,output https://stackoverflow.com/a/13497458/3289473

你能告訴我什麼即時做錯了,如果有另一種方法呢?

+0

我結束了使用這個自定義播放器:https://github.com/soundcloud/soundcloud-custom-player – Zeton

回答

0

你不能刪除它,但你可以掩蓋它。

將iframe放在div容器中&然後使用絕對定位將圖像放置在「cookie策略」文本上。

<div style="position:relative;width:100%;height:200px;"> 
    <img src="tiny-image.jpg" style="position:absolute;left:0;top:180px;" /> 
    <iframe width="100% height="200"></iframe> 
</div>