Home > front end > What is the most efficient writing CSS vertically centered?
What is the most efficient writing CSS vertically centered?
Time:11-28
Application background: in the vue component in the manipulation of the component b input TAB, users fill in the content of the style, in alignment, a click on the user to fill in the component b of the text information depend on,
Is not vertical - algin properties, tried not to use, Ask for advice
CodePudding user response:
Flex layout you're worth it
CodePudding user response:
If the layout is simple margin: auto is one of the simplest, but sometimes there are limitations So use most should be the flex elastic box layout, or use the positioning is set after positioning properties left (50%), and then the transform: translateX (50%); Center, vertical in the same way, it is suggested that several methods should be skilled, center is too common