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
html
<div class='container'> <div class='wrap'> <div class='detail'> <i class="fa fa-shield" aria-hidden="true"></i> </div> </div> </div>
css
.container{ width: 200px; height: 40px; position: relative; border-bottom: 2px #E5E5E5 solid; } .wrap{ width: 100%; height: 30px; position: absolute; bottom: -21px; padding-right: 20px; } .detail{ width: 20px; height: 30px; margin-left: 50%; background: #fff; font-size: 19px; text-align: center; padding-left: 7px; color: #0061ae; }
思路: .wrap的div和父级一样大小,padding-right为20px,那么它的内部空间还有180,它的一半是90, .detail离左边50%即距离左边90px;加上它的一半10 是100,即位于最外层元素 200的一半。
The text was updated successfully, but these errors were encountered:
No branches or pull requests
html
css
思路:
.wrap的div和父级一样大小,padding-right为20px,那么它的内部空间还有180,它的一半是90, .detail离左边50%即距离左边90px;加上它的一半10 是100,即位于最外层元素 200的一半。
The text was updated successfully, but these errors were encountered: