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
第61天 怎样把一个div居中?怎样把一个浮动元素居中?怎样把绝对定位的div居中?
The text was updated successfully, but these errors were encountered:
主要用到:
Sorry, something went wrong.
假定是水平居中 div居中: margin:0 auto; 浮动元素居中(div居中也可以用): margin-left: 50%; transform: translate(-50%); 绝对定位的div居中: { top:0; left:0; bottom:0; right:0; margin: auto; }
margin:0 auto;
margin-left: 50%; transform: translate(-50%);
{ top:0; left:0; bottom:0; right:0; margin: auto; }
主要用到: text-alin: center; margin: 0 auto; position: relative | absolute; left: 50%; vertical-align: middle; transform: translate(-50%);
No branches or pull requests
第61天 怎样把一个div居中?怎样把一个浮动元素居中?怎样把绝对定位的div居中?
The text was updated successfully, but these errors were encountered: