Guest User

Untitled

a guest
Oct 16th, 2018
98
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.57 KB | None | 0 0
  1. /**
  2. * Pure CSS Slide Toggle by joshnh
  3. */
  4.  
  5.  
  6. html {
  7. background-color: #e4ded4;
  8. background-image: -webkit-linear-gradient(hsla(0,0%,0%,.1), hsla(0,0%,100%,.1));
  9. box-shadow: inset 0 0 100px hsla(0,0%,0%,.1);
  10. height: 100%;
  11. }
  12. input[type="checkbox"] {
  13. background-image: -webkit-linear-gradient(hsla(0,0%,0%,.1), hsla(0,0%,100%,.1)),
  14. -webkit-linear-gradient(left, #f66 50%, #6cf 50%);
  15. background-size: 100% 100%, 200% 100%;
  16. background-position: 0 0, 15px 0;
  17. border-radius: 25px;
  18. box-shadow: inset 0 1px 4px hsla(0,0%,0%,.5),
  19. inset 0 0 10px hsla(0,0%,0%,.5),
  20. 0 0 0 1px hsla(0,0%,0%,.1),
  21. 0 -1px 2px 2px hsla(0,0%,0%,.25),
  22. 0 2px 2px 2px hsla(0,0%,100%,.75);
  23. cursor: pointer;
  24. height: 25px;
  25. left: 50%;
  26. margin: -12px -37px;
  27. padding-right: 25px;
  28. position: absolute;
  29. top: 50%;
  30. width: 75px;
  31. -webkit-appearance: none;
  32. -webkit-transition: .25s;
  33. }
  34. input[type="checkbox"]:after {
  35. background-color: #eee;
  36. background-image: -webkit-linear-gradient(hsla(0,0%,100%,.1), hsla(0,0%,0%,.1));
  37. border-radius: 25px;
  38. box-shadow: inset 0 1px 1px 1px hsla(0,0%,100%,1),
  39. inset 0 -1px 1px 1px hsla(0,0%,0%,.25),
  40. 0 1px 3px 1px hsla(0,0%,0%,.5),
  41. 0 0 2px hsla(0,0%,0%,.25);
  42. content: '';
  43. display: block;
  44. height: 25px;
  45. left: 0;
  46. position: relative;
  47. top: 0;
  48. width: 50px;
  49. }
  50. input[type="checkbox"]:checked {
  51. background-position: 0 0, 35px 0;
  52. padding-left: 25px;
  53. padding-right: 0;
  54. }
Add Comment
Please, Sign In to add comment