html页面分上中下三层,上中下页面布局.html

body,

ul,

li {

/* position: relative; */

margin: 0;

padding: 0;

font-family: 'Gill Sans', 'Gill Sans MT', Calibri, 'Trebuchet MS', sans-serif;

list-style: none;

}

header,

footer {

position: fixed;

z-index: 9;

width: 100%;

height: 60px;

font-size: 24px;

color: #333;

font-weight: bold;

text-align: center;

line-height: 60px;

background: #77d677;

}

footer {

bottom: 0;

}

section {

padding: 60px 0;

}

nav {

background: #93f393;

color: #333;

}

nav li {

padding: 10px 20px;

}

nav li.active {

background: #77d677;

}

article {

padding: 20px;

font-size: 24px;

/* text-align: center; */

background: #d9ffd9;

height: 2500px;

}

/* default */

section.default nav {

position: absolute;

top: 60px;

bottom: 60px;

/* float: left;

height: 100%; */

width: 200px;

}

section.default nav li {

padding: 10px 20px;

}

section.default nav li.active {

background: #77d677;

}

section.default article {

padding-left: 220px;

}

/* flexModal */

section.flexModal {

display: flex;

}

section.flexModal nav {

width: 200px;

}

section.flexModal article {

flex: 1;

}

/* fixedLeft */

section.fixedLeft nav {

position: fixed;

top: 60px;

bottom: 60px;

}

section.fixedLeft article {

margin-left: 200px;

}

.right {

position: fixed;

top: 60px;

bottom: 60px;

background: red;

right: 0px;

height: 100%;

width: 200px;

}

我是头部position: fixed;z-index: 9;

  • section.flexModal nav ul>li*5
  • 栏目一
  • 栏目二
  • 栏目三
  • 栏目四
  • 栏目五

内容区域 section.flexModal articel

宽度测试宽度测试宽度测试宽度测试宽度测试宽度测试宽度测试宽度测试宽度测试宽度测试宽度测试宽度测试宽度测试宽度测试宽度测试宽度测试宽度测试宽度测试宽度测试宽度测试宽度测试宽度测试宽度测试宽度测试宽度测试宽度测试宽度测试宽度测试宽度测试

section{

padding: 60px 0;

}

section.flexModal{

display: flex;

}

section.flexModal nav{

width: 200px;

}

section.flexModal article{

flex: 1;

}

底部版权同头部 position: fixed;z-index: 9;

一键复制

编辑

Web IDE

原始数据

按行查看

历史

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值