基本布局(固定布局)
2016-06-02 16:41
274 查看
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Insert title here</title>
<style type="text/css">
* {
padding: 0;
margin: 0;
}
.menu {
height: 5%;
width: 100%;
background-color: #0d77b6;
position: absolute;
}
.nav {
height: 90%;
width: 15%;
top: 5%;
left: 0;
bottom: 5%;
background-color: #859AF2;
position: fixed;
}
.content {
width: 85%;
height: 90%;
top: 5%;
left: 15%;
bottom: 5%;
background-color: white;
position: absolute;
overflow: auto;
z-index: 2;
}
.bottom {
position: fixed;
bottom: 0;
left: 0;
}
.top {
position: fixed;
top: 0;
left: 0;
}
.menu ul li {
height: 50px;
width: 200px;
}
.main {
margin-top: 2.5%;
}
.micro-menu{
background-color: maroon;
height: 100%;
width: 10%;
float: right;
margin-right:20px;
background-color: red;
cursor: pointer;
}
.micro-menu:HOVER{
background-color: #3385FF;
}
.micro-menu-item{
position: relative;
left: 230px;
bottom: 321px;
background-color: red;
z-index: 101;
}
</style>
</head>
<body>
<div class="menu top">top</div>
<div class="menu bottom">
<div class="micro-menu">
</div>
<div class="micro-menu-item">
<ul>
<li>菜单1</li>
<li>菜单2</li>
<li>菜单3</li>
<li>菜单4</li>
<li>菜单5</li>
</ul>
</div>
</div>
<div class="main">
<div class="nav">nav</div>
<div class="content">
<p>11111111112</p>
<p>11111111111</p>
<p>11111111111</p>
</div>
</div>
</body>
</html>
<html>
<head>
<meta charset="UTF-8">
<title>Insert title here</title>
<style type="text/css">
* {
padding: 0;
margin: 0;
}
.menu {
height: 5%;
width: 100%;
background-color: #0d77b6;
position: absolute;
}
.nav {
height: 90%;
width: 15%;
top: 5%;
left: 0;
bottom: 5%;
background-color: #859AF2;
position: fixed;
}
.content {
width: 85%;
height: 90%;
top: 5%;
left: 15%;
bottom: 5%;
background-color: white;
position: absolute;
overflow: auto;
z-index: 2;
}
.bottom {
position: fixed;
bottom: 0;
left: 0;
}
.top {
position: fixed;
top: 0;
left: 0;
}
.menu ul li {
height: 50px;
width: 200px;
}
.main {
margin-top: 2.5%;
}
.micro-menu{
background-color: maroon;
height: 100%;
width: 10%;
float: right;
margin-right:20px;
background-color: red;
cursor: pointer;
}
.micro-menu:HOVER{
background-color: #3385FF;
}
.micro-menu-item{
position: relative;
left: 230px;
bottom: 321px;
background-color: red;
z-index: 101;
}
</style>
</head>
<body>
<div class="menu top">top</div>
<div class="menu bottom">
<div class="micro-menu">
</div>
<div class="micro-menu-item">
<ul>
<li>菜单1</li>
<li>菜单2</li>
<li>菜单3</li>
<li>菜单4</li>
<li>菜单5</li>
</ul>
</div>
</div>
<div class="main">
<div class="nav">nav</div>
<div class="content">
<p>11111111112</p>
<p>11111111111</p>
<p>11111111111</p>
</div>
</div>
</body>
</html>
相关文章推荐
- Active Record 基础
- HTML Button.onclick 事件汇总
- iOS开发------XML原生解析(NSXMLParser篇)
- SQLAlchemy 几种查询方式总结
- Android onTouch事件分析和传递机制
- leetcode--Longest Palindromic Substring--最长回文子串--
- 关于javascript中Object.prototype.toString 可以被改变指向的问题
- [PHP源码阅读]strtolower和strtoupper函数
- mysql 本机root密码忘记
- iOS开发UI篇—控制器的创建
- HDU 3516 Tree Construction (四边形不等式)
- SimpleUrlHandlerMapping的配置
- SO_REUSEADDR
- 160. Intersection of Two Linked Lists
- 在两台Linux机器之间配置一条SLIP链路,以便使用互联网socket进行通信
- L-2 Linux下passwd和shadow文件内容详解
- 如何彻底的删除MySQL数据库(图文教程)
- php pdo 链接数据库
- ios学习--解压静态库.a文件
- Solr相似度算法一:Lucene TF-IDF 相关性算分公式