如何覆盖iframe中的css类集? [英] How to override css class set in iframe?
问题描述
我的页面上有第三方iframe小部件组件。这就是我在页面正文中作为HTML字符串的全部内容。这个iframe带来了一些自定义按钮,其中包含由widget.jsp设置的样式。除了< iframe>
组件外,Chrome检查员不会显示任何其他内容。但FireFox显示< iframe>
内的按钮,样式类为.button
I have third party iframe widget component on my page. This is all I have as an HTML string in the body of my page. This iframe brings some custom button with style set by that widget.jsp. Chrome inspector doesn't show anything else except <iframe>
component. But FireFox shows that button inside <iframe>
with style class ".button"
<iframe src='https://www.xxxxxxxx.com/aaa/bbb/widget.jsp?par1='TEST%20BUTTON'></iframe>
那么如何覆盖.button样式类?
So how do I override that .button style class?
推荐答案
浏览器安全性不允许操纵第三通过JavaScript派对iframe内容。也无法从外部添加CSS。
Browser security does not allow to manipulate third party iframe content via JavaScript. Adding a CSS from outside is also not possible.
更改样式的唯一方法是从 widget.jsp $ c $中C>。也许提供给你的人也可以提供一个URL参数,这样你就可以改变它的外观。
The only way to change the style would be from within widget.jsp
. Maybe whoever provides you that can also provide a URL parameter, which would allow you to change its appearance.
这篇关于如何覆盖iframe中的css类集?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!