Advertisement
Guest User

Untitled

a guest
Aug 17th, 2019
71
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.75 KB | None | 0 0
  1. <!--You'll need to hide labels. In Marketo, hide labels and use rich text fields next to checkboxes. -->
  2.  
  3. <input type="checkbox" id="switch" /><label for="switch">Toggle</label>
  4.  
  5. <style>
  6. input[type=checkbox]{
  7. height: 0;
  8. width: 0;
  9. visibility: hidden;
  10. }
  11.  
  12. label {
  13. cursor: pointer;
  14. text-indent: -9999px;
  15. width: 50px;
  16. height: 15px;
  17. background: #8996ab;
  18. display: block;
  19. border-radius: 100px;
  20. position: relative;
  21. }
  22.  
  23. label:after {
  24. content: '';
  25. position: absolute;
  26. top: 0;
  27. left: 0;
  28. width: 15px;
  29. height: 15px;
  30. background: #29353F;
  31. border-radius: 15px;
  32. transition: 0.3s;
  33. }
  34.  
  35. input:checked + label {
  36. background: #38AD48;
  37. }
  38.  
  39. input:checked + label:after {
  40. left: calc(100% - 0px);
  41. transform: translateX(-100%);
  42. }
  43.  
  44. label:active:after {
  45. width: 17px;
  46. }
  47. </style>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement