javascript - 编辑 iframe 的 css(soundcloud 嵌入式播放器)

标签 javascript css dom iframe soundcloud

我已经通过 iframe 在我的网站中嵌入了一个 soundcloud 播放器。我想知道是否可以在 iframe 中编辑 css 并更改背景颜色?

iFrame 链接:

< iframe width="100%"height="450"scrolling="no"frameborder="no"allow="autoplay"src="https://w.soundcloud.com/player/?> url=https%3A//api.soundcloud.com/playlists/666712575%3Fsecret_token%3Ds-z7Zki&color=7b5cff&auto_play=false&hide_related=false&show_comments=true&show_user=true&show_reposts=false&show_teaser=true&"visual="false""">

最佳答案

不,这是不可能的,如果 iframe 与父文档位于同一域中,您只能在 iframe 中编辑 css。

关于javascript - 编辑 iframe 的 css(soundcloud 嵌入式播放器),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/55081877/

相关文章:

html - 基于触发元素计数的绝对位置

javascript - 如何使用纯 DOM 函数(没有 jQuery)访问 DOM 元素的 CSS 样式?

javascript - 如何正确回显 onclick ='function($var)'

javascript - 为 node.js 回调实现超时

javascript - 如何在某些情况下完全禁用 FullPage.js?

html - 导航栏不粘在底部

css - 如果第一个值不为零,则 D3 比例失败

javascript - 未捕获的类型错误 : Cannot read property 'text' of undefined for getting selected value in java script

javascript - getAttribute() 与 Element 对象属性?

javascript - Javascript 中带有 New 运算符的实例