Guest User

Untitled

a guest
Dec 13th, 2018
91
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.09 KB | None | 0 0
  1. html:
  2. .agreebox
  3. input#agree(type="checkbox", name="" checked)
  4. label(for="agree") 我已阅读并同意
  5. span 《个人信用报告查询授权委托书》
  6.  
  7. css:
  8. .agreebox {
  9. position: relative;
  10. }
  11.  
  12. input[type='checkbox']:empty {
  13. position: absolute;
  14. clip: rect(0, 0, 0, 0);
  15. }
  16.  
  17.  
  18. input[type='checkbox']:empty + label {
  19. position: relative;
  20. padding-left: 1.2em;
  21. font-size: 12px;
  22.  
  23. &::before {
  24. content: '';
  25. position: absolute;
  26. left: 0;
  27. top: 50%;
  28. width: 0.8em;
  29. height: 0.8em;
  30. border: 1px solid $font;
  31. border-radius: 4px;
  32. transform: translate(0, -50%);
  33. // background: $white;
  34. }
  35.  
  36. &:after {
  37. content: '';
  38. display: block;
  39. position: absolute;
  40. left: 0;
  41. top: 20%;
  42. width: 0.7em;
  43. height: 0.3em;
  44. border-left: 2px solid darken($font, 3%);
  45. border-bottom: 2px solid darken($font, 3%);
  46. transform: rotate(-45deg);
  47. opacity: 0;
  48. }
  49. }
  50.  
  51. input[type='checkbox']:checked + label::after {
  52. opacity: 1;
  53. transition: opacity 0.1s ease-in-out;
  54. }
Add Comment
Please, Sign In to add comment