Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- html:
- .agreebox
- input#agree(type="checkbox", name="" checked)
- label(for="agree") 我已阅读并同意
- span 《个人信用报告查询授权委托书》
- css:
- .agreebox {
- position: relative;
- }
- input[type='checkbox']:empty {
- position: absolute;
- clip: rect(0, 0, 0, 0);
- }
- input[type='checkbox']:empty + label {
- position: relative;
- padding-left: 1.2em;
- font-size: 12px;
- &::before {
- content: '';
- position: absolute;
- left: 0;
- top: 50%;
- width: 0.8em;
- height: 0.8em;
- border: 1px solid $font;
- border-radius: 4px;
- transform: translate(0, -50%);
- // background: $white;
- }
- &:after {
- content: '';
- display: block;
- position: absolute;
- left: 0;
- top: 20%;
- width: 0.7em;
- height: 0.3em;
- border-left: 2px solid darken($font, 3%);
- border-bottom: 2px solid darken($font, 3%);
- transform: rotate(-45deg);
- opacity: 0;
- }
- }
- input[type='checkbox']:checked + label::after {
- opacity: 1;
- transition: opacity 0.1s ease-in-out;
- }
Add Comment
Please, Sign In to add comment