css3
一、弹性盒子
<head lang="en">
<meta name="viewport" content="width=device-width,initial-scale=1.0,minimum-scale=1.0,maximum-scale=3.0,user-scalable=no" >
<meta charset="UTF-8">
<title></title>
<!-- 自动分配-->
<style>
* {
margin: 0;
padding: 0;
}
html,body {
height: 100%;
}
.box{
height: 100%;
display: flex;
flex-direction: column;
}
.box_1 {
flex: 1;
border: 1px solid #000;
box-sizing: border-box;
}
.box1 {
flex: 1;
display: flex;
/*justify-content: center; /!*水平居中*!/*/
/*align-items: center; /!*垂直居中*!/*/
}
.box1 > span {
align-self: center; /*自身垂直居中*/
}
.box2 {
flex: 10;
}
.box3 {
flex: 1.5;
display: flex;
flex-direction: row;
/*justify-content: space-around;*/
/*justify-content: flex-start;*/
}
.box3>div {
width: 30%;
box-sizing: border-box;
border: 1px solid #000;
}
</style>
</head>
<body>
<div class="box">
<div class="box_1 box1">
<span>标题</span>
</div>
<div class="box_1 box2">2</div>
<div class="box_1 box3">
<div>首页</div>
<div>订单</div>
<div>我的</div>
</div>
</div>
</body>