пример с checkbox (для наглядности).
Для radio аналогично.
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Document</title>
<style>
label {
display: block;
width: 25px;
height: 25px;
background-color: red;
border-radius: 50%;
}
label:hover {
width: 30px;
height: 30px;
}
input[type="checkbox"] {
display: none;
}
input[type="checkbox"]:checked + label {
background-color: green;
}
</style>
</head>
<body>
<input type="checkbox" id="foo">
<label for="foo"></label>
</body>
</html>
|