In this case, it is recommended that you try setting width:auto;. After all, align-items:center; is used to cooperate with display:flex to center the child elements (vertical and horizontal). If the child elements are required to be centered, you need to set the child element. The width and height of the element
In this case, it is recommended that you try setting
width:auto;
. After all,align-items:center;
is used to cooperate withdisplay:flex
to center the child elements (vertical and horizontal). If the child elements are required to be centered, you need to set the child element. The width and height of the element