Advertisement
delvinkrasniqi

radiobutton Custom

Dec 18th, 2019
91
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
CSS 0.73 KB | None | 0 0
  1. .radiobutonat input[type="radio"]{
  2.     position: absolute;
  3.     left: -9999px;
  4. }
  5. .radiobutonat input[type="radio"] + span {
  6.     position: relative;
  7.     padding: 0 0 0 40px;
  8.     cursor: pointer;
  9. }
  10. .radiobutonat input[type="radio"] +span:before{
  11.     content: '';
  12.     background: white;
  13.     border: 2px solid green;
  14.     height: 25px;
  15.     width: 25px;
  16.     border-radius: 50%;
  17.     position: absolute;
  18.     top: 0;
  19.     left: 0;
  20. }
  21. .radiobutonat input[type="radio"] +span:after{
  22.     content: '';
  23.     background: green;
  24.     width: 15px;
  25.     height: 15px;
  26.     border-radius: 50%;
  27.     position: absolute;
  28.     top: 5px;
  29.     left: 5px;
  30.     opacity: 0;
  31.  
  32. }
  33. .radiobutonat input[type="radio"]:checked +span:after{
  34.     opacity: 1;
  35. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement