之前页面常用的垂直居中方法是margin padding,感觉有些麻烦开始采用新的居中方法 --------display.
1. display:flex;
{
display: flex;
align-items: center;
justify-content: center;
}
2.display: table-cell;
{
display: table-cell;
vertical-align: middle;
text-align: center;
}
之前页面常用的垂直居中方法是margin padding,感觉有些麻烦开始采用新的居中方法 --------display.
1. display:flex;
{
display: flex;
align-items: center;
justify-content: center;
}
2.display: table-cell;
{
display: table-cell;
vertical-align: middle;
text-align: center;
}