从第三方网站为iframe设置CSS [英] Set CSS for iframe from third party site
问题描述
我尝试设置 snapwidget instagram Feed 的样式,我想将边框设为白色。这不是小部件的设置,所以我试图添加css。似乎我的css没有被检测,因为内容是在iframe。有没有办法强制我的css的iframe内容?
I am trying to style the snapwidget instagram feed, I want to make the border white. This is not a setting of the widget so I tried adding css. It seems that my css is not being detected since the content is in an iframe. Is there a way to force my css on the iframe content?
推荐答案
它不会工作,除非iframe是在同一个域由于同源原则。 http://javascript.info/tutorial/same-origin-security-policy
It won't work unless the iframe is on the same domain due to same origin policy. http://javascript.info/tutorial/same-origin-security-policy
查看使用CSS来影响div style inside iframe for a explanation
Check out Using CSS to affect div style inside iframe for an explanation
这篇关于从第三方网站为iframe设置CSS的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!