我有一个 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/