Home > front end >  Margin: auto level vertical center
Margin: auto level vertical center

Time:04-20

in general margin: auto can only achieve horizontal center, but in combination with flexbox layout, can achieve the horizontal and vertical direction are centered,

Renderings are as follows:



CSS:
. Automargin {
display: flex;
width: 100%;
height: 100%;
}
. Automargin div {
margin: auto;
}

HTML:
Use of the parent display: flex; And the level of margin: auto; Implementation elements level vertical center & lt;/div>

CodePudding user response:

This post is what to do to send the post or to do fine

CodePudding user response:

,,,,,, yes

CodePudding user response:

Is message earn experience

CodePudding user response:

But,,, why?
  • Related