zoukankan      html  css  js  c++  java
  • jquery全屏显示iframe,缩放页面iframe高度自动变化

    jquery全屏显示iframe,缩放页面iframe高度自动变化

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
        <title>测试环境</title>
        <style type="text/css">
            *
            {
                margin: 0;
                padding: 0;
                list-style-type: none;
            }
        </style>
        <script type="text/javascript" src="https://cdn.bootcss.com/jquery/1.8.3/jquery.min.js"></script>
    </head>
    <body>
    <script type="text/javascript">
        $(document).ready(function () {
    
            var iframeHeight = function () {
                var _height = $(window).height();
                $('#content').height(_height);
            }
            window.onresize = iframeHeight;
            $(function () {
                iframeHeight();
            });
    
        });
    
    </script>
    
    <div id="container" style="overflow:hidden;">
        <iframe border="0" id="content" src="http://www.qq.com/" frameborder="0" height="100%" width="100%"></iframe>
    </div>
    </body>
    </html>
  • 相关阅读:
    QT中文报错问题
    自动获取UILabel高度
    vi编辑器的使用
    命令例子
    WPF中textBlock 变色功能
    php 删除目录及子文件
    jquery autocomplete插件
    js日历选择控件
    centeros bash: ifconfig: command not found
    php 文件日志类
  • 原文地址:https://www.cnblogs.com/webapi/p/13570318.html
Copyright © 2011-2022 走看看