We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
.container { margin: 0 auto; width: calc(100vw - 220px); height: calc(100vh - 300px); background: rgb(69, 70, 65); display: flex; /* justify-content:(x轴对齐) flex-start:从左开始 flex-end:从右开始 center:居中开始 */ /* align-items (y轴对齐) flex-start: 从上排序 flex-end: 从下排序 center:居中开始 */ justify-content: center; align-items: center; }
<!DOCTYPE html> <html lang="en"> <head> <title>Flex layout</title> <style> .container { margin: 0 auto; width: calc(100vw - 220px); height: calc(100vh - 300px); background: rgb(69, 70, 65); display: flex; /* justify-content:(x轴对齐) flex-start:从左开始 flex-end:从右开始 center:居中开始 */ /* align-items (y轴对齐) flex-start: 从上排序 flex-end: 从下排序 center:居中开始 */ justify-content: center; align-items: center; } </style> </head> <body> <div class="container"> <div> <div class="hello world">Hello World 🚀🚀</div> <div class="hello vue">Hello Vue 🏳🌈🏳🌈</div> <div class="hello green">Hello Vuex 🌈🌈</div> </div> </div> </body> </html>
The text was updated successfully, but these errors were encountered:
No branches or pull requests
垂直居中
demo
The text was updated successfully, but these errors were encountered: