水平居中:
text-align:center
margin:0 auto;
justity-content:center;
display:flex;justify-content:center
垂直居中:
line-height
vertical-align: middle
display:flex;align-items:center;
水平垂直居中:
1…display:table-cell
三栏布局实现水平垂直居中:
.left{
width:200px;
height: 300px;
background-color: #DC698A;
float:left;
}
.middle{
height: 300px;
background-color: #8CB08B;
margin:0 200px;
}
.right{
width: 200px;
height: 300px;
background-color: #3EACDD;
float: right;
}
第二种:
.left{
width:200px;
height: 300px;
background-color: #DC698A;
position: absolute;
left:0;
top:0;
}
.middle{
/width: 100%;/
height: 300px;
background-color: #8CB08B;
margin:0 200px;
}
.right{
width:200px;
height: 300px;
background-color: #3EACDD;
position: absolute;
right:0;
top:0;
}