-
div.parent{
display:flex;
justify-content: center;
align-items: center;
}
-
div.parent{
position:relative;
}
div.child {
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
}
-
div.parent {
display: grid;
}
div.child {
justify-self: center;
align-self: center;
}
-
div.parent{
font-size: 0;
text-align: center;
&::before {
content: "";
display: inline-block;
width: 0;
height: 100%;
vertical-align: middle;
}
}
div.child{
display: inline-block;
vertical-align: middle;
}
-
div.parent{
display:flex;
}
div.child{
margin:auto;
}
最后編輯于 :
?著作權歸作者所有,轉載或內容合作請聯(lián)系作者