input[type="radio"] {
-webkit-appearance: none;
position: relative;
margin-right: 5px;
border-radius: 30px;
border: 2px solid #736b68;
-webkit-box-sizing: border-box;
width: 30px;
height: 30px;
background: -webkit-gradient(
linear,
left top,
left bottom,
from(#fdfdfd),
to(#d1d1d1)
);
vertical-align: middle;
}
input[type="radio"]:disabled {
border: 2px solid #EEE;
}
/* チェック時は背景色を変更 */
input[type="radio"]:checked {
background: -webkit-gradient(
linear,
left top,
left bottom,
from(#aaa),
to(#ccc)
);
}
/* チェックの印を:before疑似要素を使って作成 */
input[type="radio"]:checked:before {
position: absolute;
left: 50%;
top: 50%;
display: block;
margin: -9px 0 0 -9px;
-webkit-box-shadow: 0 1px 1px rgba(0, 0, 0, 0.5);
content: "";
border-radius: 50px;
width: 18px;
height: 18px;
background: -webkit-gradient(
linear,
left top,
left bottom,
from(#43c915),
to(#43c915)
);
}
More than 5 years have passed since last update.
Register as a new user and use Qiita more conveniently
- You get articles that match your needs
- You can efficiently read back useful information
- You can use dark theme