circle.css 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. .checkbox-circle {
  2. display: inline-block;
  3. height: 20px;
  4. vertical-align: middle;
  5. width: 20px;
  6. }
  7. .checkbox-circle input[type=checkbox] {
  8. max-height: 0;
  9. max-width: 0;
  10. opacity: 0;
  11. position: absolute;
  12. }
  13. .checkbox-circle input[type=checkbox] + label {
  14. border-radius: 10px;
  15. border: 2px solid #212529;
  16. cursor: pointer;
  17. display: block;
  18. height: 20px;
  19. margin-bottom: 0;
  20. margin-top: 0;
  21. position: relative;
  22. text-indent: -5000px;
  23. width: 20px;
  24. }
  25. .checkbox-circle input[type=checkbox] + label:before {
  26. background: #212529;
  27. border-radius: 24px;
  28. content: "";
  29. display: block;
  30. height: 12px;
  31. left: 2px;
  32. opacity: 0;
  33. position: absolute;
  34. top: 2px;
  35. transition: .1s ease-in-out;
  36. width: 12px;
  37. }
  38. .checkbox-circle input[type=checkbox]:checked + label {
  39. border-color: #212529;
  40. }
  41. .checkbox-circle input[type=checkbox]:focus + label {
  42. box-shadow: 0 0 0 0.25rem rgb(13 110 253 / 25%);
  43. outline: 0;
  44. }
  45. .checkbox-circle input[type=checkbox]:hover + label:before {
  46. background: #212529;
  47. opacity: 0.5;
  48. }
  49. .checkbox-circle input[type=checkbox]:checked + label:before {
  50. background: #212529;
  51. opacity: 1;
  52. }