phpcnUI用户手册首页弹性布局改造
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>phpcnUI用户手册</title>
<link rel="stylesheet" href="static/css/style.css">
<style type="text/css">
body{
display: flex;
flex-flow:column nowrap;
height: 100vh;
}
main{
flex: 1;display: flex;
flex-flow: row nowrap;
}
header{height: 80px;}
footer{height: 50px;}
header,footer{
box-sizing: border-box;
line-height: 60px;
width: 100%;
box-sizing: border-box;
padding: 0px 20px;
display: flex;
background: #D4D4D4;
}
header > h3{flex: 1;}
main > aside{
box-sizing: border-box;
padding: 20px 0px;
width: 200px;
background: #EEEEEE;
display: flex;
flex-flow:column nowrap;
}
main > aside > a{
height: 40px;
line-height: 40px;
padding: 5px 20px;
text-align: center;
}
main > aside > a:hover{
}
main > artical{
flex: 1;
}
main > aside:first-of-type {
order: -1;
}
footer > span{flex: 1;}
footer > a{
padding: 0 10px;
color: #ccc;
}
main > artical{
display: flex;
justify-content: center;
align-items: center;
}
</style>
</head>
<body>
<!-- 头部 -->
<header>
<h1 class="phpcn-color-deepgray phpcn-ml-40" ><span class="phpcn-color-coral" style="text-shadow: 2px 2px 1px #333; font-weight: bolder">phpcn UI</span> 用户参考手册</h1>
</header>
<!-- 主本 -->
<main>
<aside>
<ul class="phpcn-p-30 phpcn-lh-normal phpcn-ml-20" id="nav" >
<li style="cursor: pointer;"><strong>前端基础</strong>
<ul class="phpcn-ml-20 phpcn-dl-n" >
<li><a href="base/1_框架安装.html" target="content">框架安装</a></li>
<li><a href="base/2_页面结构.html" target="content">页面结构</a></li>
<li><a href="base/3_常用标签.html" target="content">常用标签</a></li>
<li><a href="base/4_CSS选择器.html" target="content">CSS选择器</a></li>
<li><a href="base/5_CSS样式控制.html" target="content">CSS样式控制</a></li>
<li><a href="base/6_CSS盒模型.html" target="content">CSS盒模型</a></li>
<li><a href="base/7_CSS浮动与定位.html" target="content">CSS浮动与定位</a></li>
<li><a href="base/8_CSS常用布局方式.html" target="content">CSS常用布局方式</a></li>
<!-- <li><a href="">Flex弹性布局</a></li>-->
<!-- <li><a href="">媒体查询</a></li>-->
</ul>
</li>
<li style="cursor: pointer;"><strong>框架组件</strong>
<ul class="phpcn-ml-20 phpcn-dl-n">
<li><a href="component/1_栅格布局.html" target="content">栅格布局</a></li>
<li><a href="component/2_常用样式.html" target="content">常用样式</a></li>
<li><a href="component/3_文本与背景色.html" target="content">文本与背景色</a></li>
<li><a href="component/4_表格.html" target="content">表格</a></li>
<li><a href="component/5_分页条.html" target="content">分页条</a></li>
</ul>
</li>
</ul>
</aside>
<artical>
<iframe src="welcome.html" name="content" style="width: 100%;height: 99.6%;" frameborder="0" marginwidth="0" marginheight="0" ></iframe>
</artical>
</main>
<!-- 底部 -->
<footer>
<p class="phpcn-mb-10 phpcn-tx-c"><a href="https://www.php.cn/">php中文网</a>©版权所有(2019)</p>
</footer>
<script>
// 控制导航折叠
var menus = document.querySelectorAll('#nav > li');
menus.forEach(function (menu){
menu.firstElementChild.addEventListener('click', function (evt) {
evt.target.nextElementSibling.classList.toggle('phpcn-dl-n');
}, false);
});
</script>
</body>
</html>
这两周所学知识汇总