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
今天又发现一种新的居中方式,给父元素加相对定位,待居中元素,使用绝对定位
<div class="box"> <div></div> </div>
css样式
.box { width: 200px; height: 200px; border: 1px solid red; position: relative; } .box div { width: 50px; height: 50px; background: red; position: absolute; top: 0; right: 0; bottom: 0; left: 0; margin: auto; }
The text was updated successfully, but these errors were encountered:
No branches or pull requests
今天又发现一种新的居中方式,给父元素加相对定位,待居中元素,使用绝对定位
css样式
The text was updated successfully, but these errors were encountered: