Iframe

Posted fatrabbit-

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了Iframe相关的知识,希望对你有一定的参考价值。

  • 自适应iframe的高
    <!-- 
        frameborder :设置iframe的边框
        scrolling:设置iframe的滚动条
        src:设置iframe的路径
        onload:要设置iframe的自适应,必须设置在行内标签,通过js设置的话是显示了之后才进行值的设置,并没有什么效果
    -->
    <iframe id="userIframe" 
    onload="this.style.height=Math.max(this.contentWindow.document.body.scrollHeight,this.contentWindow.document.documentElement.scrollHeight)+\‘px\‘" 
    width="100%" height="auto" frameborder="0" scrolling="no" class="router-view-iframe-style" src="home_user_info.html"></iframe>

     

 

以上是关于Iframe的主要内容,如果未能解决你的问题,请参考以下文章

从 google-site 上的嵌入式(iframe)片段,引用存储在 google 驱动器上的 json 文件

拥有的50个CSS代码片段(上)

Google 跟踪代码管理器集成安全性 - noscript iframe 沙盒

jQuery 的选择器在 iframe 中不起作用

如何保护来自iframe的Oauth2隐式流

easyui dialog弹出框的遮罩只遮罩iframe内的区域,怎样能遮罩整个页面