如何将CSS属性添加到iframe之外的元素? [英] How to add CSS property to elements outside iframe?

查看:252
本文介绍了如何将CSS属性添加到iframe之外的元素?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

很抱歉,这不是一个合适的地方.我在弄清楚这个问题上遇到了麻烦.

I'm sorry if this wasn't the right place to ask. I'm having trouble figuring this one out.

我想做的是在我自己的演示站点中删除主题森林或mojothemes等市场提供的演示栏.

What I'm trying to do is removing the demo bar provided by marketplaces like themeforest or mojothemes within my own demo site.

但是由于要获取市场上主题的实时演示中显示的内容,因此该主题将出现在其网站内的iframe中.

But since what appears in the marketplace's live demo of a theme is fetched, it appears within an iframe inside of their site.

我尝试在他们的论坛中提问,但是没有人提供帮助.

I've tried asking in their forums but no one has been helpful.

有什么办法可以解决吗?在市场上做一个榜样会很棒.

Is there any way to do about this? An example done in a marketplace would be great.

推荐答案

您不能(由于跨站点脚本编写- http://en.wikipedia.org/wiki/Cross-site_scripting ),因为它是单独的文档.但是您可以做的是使用Web通讯: http://en.wikipedia.org/wiki/Web_Messaging 会影响iframe中的JS/CSS(但这需要双方采取行动).

You cannot (due to the Cross Site Scripting - http://en.wikipedia.org/wiki/Cross-site_scripting) as it is a separated document. But what You can do is to use Web Messenging: http://en.wikipedia.org/wiki/Web_Messaging to affect JS/CSS within the iframe (but this will require actions on both sides).

这篇关于如何将CSS属性添加到iframe之外的元素?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆