ICode9

精准搜索请尝试: 精确搜索
首页 > 其他分享> 文章详细

div+js实现iframe效果[转]

2021-02-08 15:59:13  阅读:138  来源: 互联网

标签:bottom top js --- iframe 10px div height left


[转] https://blog.csdn.net/wpy1282316637/article/details/68484553

<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="iFrameWeb2.aspx.cs" Inherits="web2_test.iFrameWeb2" %>

<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <meta name="author" content="Chomo" />
    <link rel="start" href="http://www.14px.com" title="Home" />
    <title>div仿框架布局</title>
    <style type="text/css">
        * {
            margin: 0;
            padding: 0;
            list-style: none;
        }

        html {
            height: 100%;
            overflow: hidden;
            background: #fff;
            /*---ie6---*/
            _padding: 70px 10px;
        }
        body {
            height: 100%;
            overflow: hidden;
            background: #fff;
        }

        div {
            background: #f60;
            line-height: 1.6;
        }

        .top {
            position: absolute;
            left: 10px;
            top: 10px;
            right: 10px;
            height: 50px;
            /*---ie6---*/
            _height: 50px;
            _margin-top: -60px;
            _margin-bottom: 10px;
            _position: relative;
            _top: 0;
            _right: 0;
            _bottom: 0;
            _left: 0;
        }

        .side {
            position: absolute;
            left: 10px;
            top: 70px;
            bottom: 70px;
            width: 200px;
            overflow: auto;
            /*---ie6---*/
            _height: 100%;
            _float: left;
            _width: 200px;
            _position: relative;
            _top: 0;
            _right: 0;
            _bottom: 0;
            _left: 0;
        }


        .main {
            position: absolute;
            left: 220px;
            top: 70px;
            bottom: 70px;
            right: 10px;
            overflow: auto;
            /*---ie6---*/
            _height: 100%;
            _margin-left: 207px;
            _position: relative;
            _top: 0;
            _right: 0;
            _bottom: 0;
            _left: 0;
        }



        .bottom {
            position: absolute;
            left: 10px;
            bottom: 10px;
            right: 10px;
            height: 50px;
            /*---ie6---*/
            _height: 50px;
            _margin-top: 10px;
            _position: relative;
            _top: 0;
            _right: 0;
            _bottom: 0;
            _left: 0;
        }
   
        li a {
            float: left;
            width: 200px;
            display: block;
        }
    </style>

    <script src="scripts/jquery-1.10.2.min.js"></script>

 

```javascript
   <script>
        /** 初始化加载页面 **/
        jQuery(document).ready(function () {
            document.getElementById("iframe").src = 'index.htm';
        })
        /****   网页跳转到页面顶部  ****/
        function parentGoTop() {
            $(function () {
                $('html, body').animate({
                    scrollTop: 0
                }, 0);
            });
        }
        /****  根据链接地址跳转页面   ****/
        function clicklist(uri) {
            document.getElementById("iframe").src = uri;
            parentGoTop();
        }
    </script>
<form id="form1" runat="server">
    <div>


        <div class="top"></div>
        <div class="side">
            <ul class='menu'> 
                <li><strong>资源专版快讯管理</strong></li>
                <li><a onclick="clicklist('guagedemo.aspx');">发布网上资源/供求专版 </a></li>
                <li><a onclick="clicklist('DataTable/DistinctDatatable.aspx');">推荐资源发布</a></li>
                <li><a onclick="clicklist('Treeview.aspx');">供求快讯发布</a></li>
                <li><a onclick="clicklist('WebForm1.aspx');">供求快讯重发/修改/删除</a></li>
            </ul>
        </div>
        <div class="main">
            <iframe id="iframe" src="" height='850px' width="700" frameborder="0" scrolling="yes"></iframe>
        </div>
        <div class="bottom"></div>
    </div>
</form>
```

标签:bottom,top,js,---,iframe,10px,div,height,left
来源: https://blog.csdn.net/weixin_35607038/article/details/113758169

本站声明: 1. iCode9 技术分享网(下文简称本站)提供的所有内容,仅供技术学习、探讨和分享;
2. 关于本站的所有留言、评论、转载及引用,纯属内容发起人的个人观点,与本站观点和立场无关;
3. 关于本站的所有言论和文字,纯属内容发起人的个人观点,与本站观点和立场无关;
4. 本站文章均是网友提供,不完全保证技术分享内容的完整性、准确性、时效性、风险性和版权归属;如您发现该文章侵犯了您的权益,可联系我们第一时间进行删除;
5. 本站为非盈利性的个人网站,所有内容不会用来进行牟利,也不会利用任何形式的广告来间接获益,纯粹是为了广大技术爱好者提供技术内容和技术思想的分享性交流网站。

专注分享技术,共同学习,共同进步。侵权联系[81616952@qq.com]

Copyright (C)ICode9.com, All Rights Reserved.

ICode9版权所有