LOADING...

Preview

Pen ID
Unlock Campus Themeforest adv

 

Code

Animated and styled radio buttons
(with no extra elements)

CSS
*, *:before, *:after {
  box-sizing: border-box;
}

html {
  width: 100%;
  height: 100%;
  position: relative;
  background: #222 url(https://i.cloudup.com/B-nGjfTv8k.jpg) no-repeat;
  background-image: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)), url(https://i.cloudup.com/B-nGjfTv8k.jpg);
  background-size: cover;
}

.options {
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  color: #ddd;
  padding: 48px;
  font-family: 'Open Sans', sans-serif;
  text-align: center;
}
.options input {
  display: none;
}
.options > label {
  display: inline-block;
  position: relative;
  margin-right: 16px;
  padding-left: 24px;
  cursor: pointer;
}
.options > label:before {
  content: "";
  display: block;
  position: absolute;
  width: 16px;
  height: 16px;
  left: 0;
  top: 50%;
  margin-top: -8px;
  border: 1px solid #fff;
  border-radius: 8px;
}
.options > label:after {
  content: "";
  display: block;
  position: absolute;
  width: 0;
  height: 0;
  top: 50%;
  left: 8px;
  margin-top: 0;
  background: #fff;
  border-radius: 4px;
  transition: .2s ease-in-out;
}
.options :checked + label:after {
  height: 8px;
  width: 8px;
  margin-top: -4px;
  left: 4px;
}

Description

Pure HTML/CSS animated and styled radio buttons with label (no extra elements required). Did these for a recent project and was quite happy with them.
Term
Wed, 12/06/2017 - 19:43

Related Codes

Pen ID
Pen ID
Pen ID
Square Adv