<!doctype html>
<html xmlns="http://www.w3.org/1999/xhtml" >
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>div仿框架布局</title>
<style type="text/css">
* { margin:0; padding:0; list-style:none;}
html,body { height:100%; overflow:hidden;}
/*reset panel posotion*/
.panel{position:absolute;top:0px;right:0px;bottom:0px; left:0px; z-index:1;}
.top { height:50px; background-color:#ccc;}
.left { top:50px; bottom:50px; width:200px; background-color:#eee;}
.main { left:200px; top:50px; bottom:50px;background-color:#f5f5f5;}
.bottom { top:auto; height:50px;background-color:#ccc;}
.panel iframe { width:100%; height:100%;} /* class for hide top*/
.hidetop .top{display:none;}
.hidetop .left,.hidetop .main{top:0px;} /* class for hide bottom*/
.hidebottom .bottom{display:none;}
.hidebottom .left,.hidebottom .main{bottom:0px;} /*class for hide left*/
.hideleft .left{display:none;}
.hideleft .main{left:0px;} /* HACK:*IE6/7 _IE6*/
html { *padding:50px 0px 50px 0px;}
.panel{*position:relative;}
.top { *margin-top:-50px; *margin-bottom:0px; }
.left { *height:100%; *float:left; *top:0px; }
.main { *height:100%; *top:0;*left:0px;_left:-3px;}/*IE 6 float 3px bug*/
.hidetop{*padding-top:0px;}
.hidebottom{*padding-bottom:0px;}
.hideleft{*padding-left:0px;} </style>
<script type="text/javascript">
function toggleClass(dom,className){
var reg = new RegExp(className,"g"),
cn = dom.className,
newcn= cn.indexOf(className)==-1?(cn+" "+className):cn.replace(reg,"");
dom.className=newcn;
}
</script>
</head>
<body>
<div class="panel top">顶部内容(iframe上scrolling="yes" style="overflow:visible;"防止IE6出现iframe横向滚动条)</div>
<div class="panel left">
<input type="button" id="" name="" value="收起/显示上部" onclick="toggleClass(document.getElementsByTagName('html')[0],'hidetop')" />
<br />
<input type="button" id="" name="" value="收起/显示左部" onclick="toggleClass(document.getElementsByTagName('html')[0],'hideleft')" />
<br />
<input type="button" id="" name="" value="收起/显示下部" onclick="toggleClass(document.getElementsByTagName('html')[0],'hidebottom')" />
</div>
<div class="panel main" ><iframe frameborder="0" scrolling="yes" style="overflow:visible;" src="http://www.baidu.com"></iframe></div>
<div class="panel bottom">底部内容</div>
</body>
</html>

使用div模拟出frameset效果的更多相关文章

  1. 2D图形如何运动模拟出3D效果

    一.先看看实现效果图 (左边的2d图片如何运动出右边3d的效果)                                      引言: 对于这个题目,真的很尴尬,不知道取啥,就想了这个题目 ...

  2. div滚动条弹出层效果 (所需要的css文件和js文件,都已经上传到文件里面了progressbar.rar)

    <%--总的弹出层--%> <div class="tcck" id="joinclub" style="display:none& ...

  3. div弹出层的效果带关闭按钮

    下面我做的这个是个进度条的弹出层 <style type="text/css"> #tuxiang { width: 57px; } /*div弹出框的css*/ .t ...

  4. div模拟textarea文本域轻松实现高度自适应——张鑫旭

    by zhangxinxu from http://www.zhangxinxu.com本文地址:http://www.zhangxinxu.com/wordpress/?p=1362 一.关于tex ...

  5. css3 模拟标牌震荡效果

    <!DOCTYPE html> <html> <head> <meta charset="utf-8"> <meta http ...

  6. div 模拟<select>事件

    IE7 下,不能够自定义<select>/<option>的样式,所以为了方便起见,用div可以进行模拟 <!doctype html> <html> ...

  7. Fancybox丰富的弹出层效果

    Fancybox是一款优秀的jquery插件,它能够展示丰富的弹出层效果.前面我们有文章介绍了facybox弹出层效果,相比facybox,fancybox显得功能更为齐全,它除了可以加载DIV,图片 ...

  8. div模拟table,可实现左右高度同增长(html布局)

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/ ...

  9. js单击输入框后弹出提示信息效果

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/ ...

随机推荐

  1. Codeforces Round #530 Div. 1 自闭记

    A:显然应该让未确定的大小尽量大.不知道写了啥就wa了一发. #include<iostream> #include<cstdio> #include<cmath> ...

  2. [USACO4.4]追查坏牛奶Pollutant Control

    题目链接:ヾ(≧∇≦*)ゝ Solution: 第一问很好解决,根据网络流:最大流=最小割定理,我们可以轻松求出. 至于第二问,我们不妨把每一条边乘上一个大于1000的数再加上1. 这样的话,对于最小 ...

  3. 如何使用Python对Instagram进行数据分析?

     我写此文的目的在于展示以编程的方式使用Instagram的基本方法.我的方法可用于数据分析.计算机视觉以及任何你所能想到的酷炫项目中.Instagram是最大的图片分享社交媒体平台,每月活跃用户约五 ...

  4. 【BZOJ1434】[ZJOI2009]染色游戏(博弈论)

    [BZOJ1434][ZJOI2009]染色游戏(博弈论) 题面 BZOJ 洛谷 题解 翻硬币的游戏我似乎原来在博客里面提到过,对于这类问题,当前局面的\(SG\)函数就是所有反面朝上的硬币单一存在时 ...

  5. BZOJ4912 [Sdoi2017]天才黑客 【虚树 + 最短路】

    题目链接 BZOJ4912 题解 转移的代价是存在于边和边之间的 所以把边看做点,跑最短路 但是这样做需要把同一个点的所有入边和所有出边之间连边 \(O(m^2)\)的连边无法接受 需要优化建图 膜一 ...

  6. vue 新增时清除表单验证注意事项

    // 清除表单校验的提示 if (this.$refs['XXX']) { // 延时执行 this.$nextTick(function () { this.$refs['XXX'].clearVa ...

  7. MySQL的replace方法

    mysql中replace函数直接替换mysql数据库中某字段中的特定字符串,不再需要自己写函数去替换,用起来非常的方便,mysql 替换函数replace()Update `table_name` ...

  8. Python配置tab自动补全功能

    # cat tab.py #!/usr/bin/python # python tab file import sys import readline import rlcompleter impor ...

  9. Zephir入门教程一

    一.如何安装 zephir-安装和初体验:http://blog.csdn.net/u011142688/article/details/51619811 二.如何使用 需要切到工作目录下,也就是co ...

  10. python 基础 元组()

    # 元组 应用场景 # 尽管 Python的列表中可以存储不同类型的数据 # 但是在开发中,更多的应用场景是 # 1.列表存储相同类型的数据 # 2.通过迭代遍历,在循环体内部,针对列表中的每一项元素 ...