画布 1
水平垂直居中
  absolute + transform
  writing-mode
  lineheight
  table
  cass-table
  flex
  grid
  absolute + calc
  absolute + margin auto
  absolute + 负 margin
  定宽高型
.father{
position: relative;
}
.child{
position: absolute;
top: calc(50%-50px);
left: calc(50%-50px);
width: 100px;
height: 50px;
}
  定宽高型
margin 值为负的居中元素的一半
.father{
position: relative;
}
.child{
position: absolute;
top: 50%;
left: 50%;
margin-left: -50px;
margin-top: -50px;
width: 100px;
height: 50px;
}
  不定宽高型
.father{
position: relative;
}
.child{
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
}
  不定宽高型
.father{
width: 300px;
height: 300px
line-height: 300px;
text-align: center;
font-size: 0;
}
.child{
display: inline-block;
vertical-align: middle;
line-height: initial;
font-size: 16px;
}
  不定宽高型
```HTML```
<div class="father">
<div class="father-inner">
<div class="child">vertical center</div>
</div>
</div>
```CSS```
.father{
writing-mode: vertical-lr;
text-align: center;
}
.father-inner{
writing-mode: horizontal-tb;
display: inline-block;
text-align: center;
width: 100%;
}
.child{
display: inline-block;
margin: auto;
text-align: left;
}
  定宽高型
.father{
position: relative;
}
.child{
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
width: 100px;
height: 100px;
}
  .father{
display: flex;
justify-content: center;
align-items: center;
}
.child{}
  Note:
定宽高类型指的是居中元素是否定宽高
无特殊说明HTML结构如下
```HTML```
<div class="father">
<div class="child">vertical-center</div>
</div>
  .father{
display: grid;
}
.child{
align-self: center;
justify-self: center;
}
  .father{
display: table-cell;
text-align: center;
vertical-align: middle;
}
.child{
display: inline-block;
}
  不定宽高型
```HTML```
<table>
<tbody>
<tr>
<td class="father">
<div class="child">vertical center</div>
<td>
</tr>
<tbody>
</table>
```CSS```
.father{
width: 300px;
height: 300px;
text-align: center;
}
.child{
display: inline-block;
}