给class="div1"的div设置一个高度,然后:overflow-y: auto;
解决方案 »
- 错误:event为空或不是对象
- 如何通过JQuery读取服务端XML数据修改完成后保存至服务端
- 急求:EXTJS的GridPanel和TreePanel新增加一条记录后选中新增加的,怎么实现?
- uncaught exception: [Exception... "Out of Memory" nsresult: "0x8007000e
- 大家能否提供点关于javascript、正则表达式、DIV+CSS方面的书。
- 我想实现在一个htm文件内分页用javastript,就象是暗的选项卡那样,选项卡头在右下方。如何实现?急!!!
- Object #<Socket> has no method 'foo' 这个错误时什么意思?
- 如何得到滚动条与页面顶部的距离??
- 如何用Javascript打开一个窗口,并设置为焦点窗口
- 学了这么久的JAVASCRIPT,觉得一点用都没有,表单,特效,这就是全部吗?
- $("#div").html()如何显示一个集合?
- javascript怎么遍历json和删除json元素?
不设置宽度能不能判断div 里面的内容超出 浏览器的底部的时候 div出现滚动条而不是浏览器出现滚动条
<!DOCTYPE HTML>
<head>
<meta charset="GBK" >
<title>title</title>
<style type="text/css">
*{padding:0;margin:0;}
html,body{height:100%;}
.header{width:100%;height:100px;position:absolute;left:0;top:0;z-index:3;background:#0f0;}
.sidebar{width:120px;height:100%;position:absolute;left:0;top:0;z-index:2;background:#f00;}
.sidebar .inner{padding-top:100px;}
.bodyer{width:100%;height:100%;overflow:hidden;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;-o-box-sizing:border-box;box-sizing:border-box;padding:100px 0 0 120px;position:absolute;left:0;top:0;z-index:1;background:#0ff;}
.bodyer .inner{width:100%;height:100%;overflow:auto;}
</style>
</head>
<body>
<div class="header">
header
</div>
<div class="sidebar">
<div class="inner">sidebar</div>
</div>
<div class="bodyer">
<div class="inner">
<div style="width:200px;height:1200px;">content</div>
</div>
</div>
</body>
</html>