前端012-css-后台布局1-fixed定位

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>css后台布局</title>
<style>
body{ margin:0}/* 去掉边框,*/
.page-header{
height: 90px;
background-color: #8e908c;
}
.page-content .menu{
position: fixed;
top: 90px;
left: 0;
bottom: 0;
width: 300px;
background-color: #e75e15;
}
.page-content .content{
position: fixed;
top: 90px;
right: 0;
bottom: 0;
left: 300px;
background-color: #a8acad;
overflow: auto;/*出现滚动条*/
}
</style>
</head>
<body>
<div class="page-header"></div>
<div class="page-content">
<div class="menu">
<h1>菜单一</h1>
<h1>菜单一</h1>
<h1>菜单一</h1>
<h1>菜单一</h1>
<h1>菜单一</h1>
<h1>菜单一</h1>
</div>
<div class="content">
<h1>style:min-width:200px 最小宽度,有些浏览器不支持。</h1>
<h1>style:min-width:200px 最小宽度,有些浏览器不支持。</h1>
<h1>style:min-width:200px 最小宽度,有些浏览器不支持。</h1>
<h1>style:min-width:200px 最小宽度,有些浏览器不支持。</h1>
<h1>style:min-width:200px 最小宽度,有些浏览器不支持。</h1>
<h1>style:min-width:200px 最小宽度,有些浏览器不支持。</h1>
<h1>style:min-width:200px 最小宽度,有些浏览器不支持。</h1>
<h1>style:min-width:200px 最小宽度,有些浏览器不支持。</h1>
<h1>style:min-width:200px 最小宽度,有些浏览器不支持。</h1>
<h1>style:min-width:200px 最小宽度,有些浏览器不支持。</h1>
<h1>style:min-width:200px 最小宽度,有些浏览器不支持。</h1>
<h1>style:min-width:200px 最小宽度,有些浏览器不支持。</h1>
<h1>style:min-width:200px 最小宽度,有些浏览器不支持。</h1>
<h1>style:min-width:200px 最小宽度,有些浏览器不支持。</h1>
<h1>style:min-width:200px 最小宽度,有些浏览器不支持。</h1>
<h1>style:min-width:200px 最小宽度,有些浏览器不支持。</h1>

</div>
</div>
<div class="page-footer"></div>
</body>
</html>
posted @   wode-wode  阅读(50)  评论(0编辑  收藏  举报
相关博文:
阅读排行:
· TypeScript + Deepseek 打造卜卦网站:技术与玄学的结合
· 阿里巴巴 QwQ-32B真的超越了 DeepSeek R-1吗?
· 【译】Visual Studio 中新的强大生产力特性
· 10年+ .NET Coder 心语 ── 封装的思维:从隐藏、稳定开始理解其本质意义
· 【设计模式】告别冗长if-else语句:使用策略模式优化代码结构
点击右上角即可分享
微信分享提示