今天学习到了一个非常神奇的css布局方法
position: absolute;
top:61px;
bottom: 0px;
把 position设置为 absolute 后 top就是顶边拉 left就是左边拉
那么如果把 底边调成0.嘿嘿,是不是变成窗口自适应了?
做这个的时候想过 直接设置 height:100%.但是这是无效帝,,,具体为什么我也不知道哈...
[css]
#head{
width:100%;
height:61px;
border-bottom:solid 1px #ccc;
background-image:url(../img/topbg.gif);
background-repeat:repeat-x;
}
#logo{
width:189px;
height:61px;
background-image:url(../img/logo_dmin.png);
}
#left{
padding-top:15px;
width:205px;
height:auto;
overflow-y:auto;
background-image: url(../img/leftbg.gif);
position: absolute;
top:61px;
bottom: 0px;
}
#left h4{
margin-left:18px;
background-image:url(../img/menuf.gif);
height: 20px;
width: 160px;
font-size: 12px;
text-align: center;
line-height:20px;
//font-weight:normal;
}
#left li{
padding-top: 5px;
padding-bottom: 5px;
padding-left:36px;
cursor: pointer;
color:#555;
font-size: 12px;
}
#right{
overflow-y:auto;
position: absolute;
top:61px;
left: 205px;
bottom:0px;
right:0px;
}
#head{
width:100%;
height:61px;
border-bottom:solid 1px #ccc;
background-image:url(../img/topbg.gif);
background-repeat:repeat-x;
}
#logo{
width:189px;
height:61px;
background-image:url(../img/logo_dmin.png);
}
#left{
padding-top:15px;
width:205px;
height:auto;
overflow-y:auto;
background-image: url(../img/leftbg.gif);
position: absolute;
top:61px;
bottom: 0px;
}
#left h4{
margin-left:18px;
background-image:url(../img/menuf.gif);
height: 20px;
width: 160px;
font-size: 12px;
text-align: center;
line-height:20px;
//font-weight:normal;
}
#left li{
padding-top: 5px;
padding-bottom: 5px;
padding-left:36px;
cursor: pointer;
color:#555;
font-size: 12px;
}
#right{
overflow-y:auto;
position: absolute;
top:61px;
left: 205px;
bottom:0px;
right:0px;
}html的代码为
[html]
文章管理
- 添加栏目
- 添加文章
- 管理文章
网站管理
- 基本设置
- 其他

热AI工具

Undresser.AI Undress
人工智能驱动的应用程序,用于创建逼真的裸体照片

AI Clothes Remover
用于从照片中去除衣服的在线人工智能工具。

Undress AI Tool
免费脱衣服图片

Clothoff.io
AI脱衣机

Video Face Swap
使用我们完全免费的人工智能换脸工具轻松在任何视频中换脸!

热门文章

热工具

记事本++7.3.1
好用且免费的代码编辑器

Dreamweaver CS6
视觉化网页开发工具

ZendStudio 13.5.1 Mac
功能强大的PHP集成开发环境

螳螂BT
Mantis是一个易于部署的基于Web的缺陷跟踪工具,用于帮助产品缺陷跟踪。它需要PHP、MySQL和一个Web服务器。请查看我们的演示和托管服务。

SublimeText3 Mac版
神级代码编辑软件(SublimeText3)