Radio Button Design in Unbounce



<script>
 
  var element = document.querySelectorAll('.option');

for (i = 0; i < element.length; ++i) {
element[i].innerHTML = element[i].innerHTML + '<span class="checkmark"></span>';
}
</script>



<style>
  #lp-pom-form-39 .lp-pom-form-field .opt-label {
   
    padding-left: 25px;
}
/* The container */
.option {
  display: block;
  position: relative;
  padding-left: 35px;
  margin-bottom: 12px;
  cursor: pointer;
  font-size: 22px;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
}

/* Hide the browser's default radio button */
.option input {
  position: absolute;
  opacity: 0;
  cursor: pointer;
}

/* Create a custom radio button */
.checkmark {
    position: absolute;
    top: 7px;
    left: 7px;
    height: 25px;
    width: 25px;
    background-color: #eee;
    border-radius: 50%;
}

/* On mouse-over, add a grey background color */
.option:hover input ~ .checkmark {
  background-color: #ccc;
}

/* When the radio button is checked, add a blue background */
.option input:checked ~ .checkmark {
  background-color: #ff8a35;
}

/* Create the indicator (the dot/circle - hidden when not checked) */
.checkmark:after {
  content: "";
  position: absolute;
  display: none;
}

/* Show the indicator (dot/circle) when checked */
.option input:checked ~ .checkmark:after {
  display: block;
}

/* Style the indicator (dot/circle) */
.option .checkmark:after {
     top: 9px;
    left: 9px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: white;
}
</style>
Radio Button Design in Unbounce Radio Button Design in Unbounce Reviewed by webmission on 06:03 Rating: 5

No comments:

Powered by Blogger.