css - 如何在级联样式表 (CSS) 中污染 iframe 的 CSS 规则路径?

标签 css iframe

我有一个 html 页面,我在该页面中插入了一个 iframe。 我对 iframe 内容有疑问。在 iframe 中显示一个按钮,该按钮具有可在任何地方访问网站的链接,我希望该按钮不显示如何在 CSS 中设置 {显示:无} 但是如何在 iframe 按钮中没有检测到任何不显示的 css 规则。

帮助我掌握 CSS

最佳答案

您必须使用 seamless 属性:

This Boolean attribute indicates that the browser should render the inline frame in a way that makes it appear to be part of the containing document, for example by applying CSS styles that apply to the <iframe> to the contained document before styles specified in that document, and by opening links in the contained documents in the parent browsing context (unless another setting prevents this). In XHTML, attribute minimization is forbidden, and the seamless attribute must be defined as <iframe seamless="seamless">.

问题是浏览器支持目前可以忽略不计。同时,您可以观看Seamless iframes. The future, today! ,一个幻灯片,可以让您了解如何实现这些功能。

关于css - 如何在级联样式表 (CSS) 中污染 iframe 的 CSS 规则路径?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/21971850/

相关文章:

html - CSS 和 HTML Accordion 的一些问题

css - css ID 选择器如何选择两个具有相同 ID 的元素?

javascript - jQuery 隐藏所有没有类的元素

javascript - Chrome 扩展 - 在底层页面上覆盖 iframe 的内容

javascript - Javascript 中 opener 的跨域更新哈希

c# - IE 11 问题 : Session getting null on Iframe postback. ..?

html - 使用所有可用空间在另一个 div 中居中 div

javascript - 视觉二维数组中的动画

javascript - 从嵌入式 iframe 访问 window.parent

javascript - 使用从父页面到 iframe 的跳转链接