-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcheckbox.html
59 lines (59 loc) · 1.83 KB
/
checkbox.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Document</title>
<style>
.container{
font-size: 0;
}
.radio-name{
display:inline-block;
vertical-align: middle;
font-size: 16px;
}
.radio-beauty{
width: 18px;
height: 18px;
box-sizing: border-box;
display:inline-block;
border:1px solid skyblue;
margin:0 15px 0 3px;
border-radius:50%;
vertical-align: middle;
}
.radio-beauty:hover{
box-shadow: 0 0 7px lightblue;
padding:2px;
background-color:lightblue;
background-clip:content-box;
}
input[type='radio']:checked+.radio-beauty{
padding:2px;
background-color:orange;
background-clip:content-box;
}
</style>
</head>
<body>
<div class="container">
<label for="">
<span class='radio-name'>前段工程师</span>
<input type='radio' name='radioName' id='radioName1' hidden/>
<label for="radioName1" class='radio-beauty'></label>
</label>
<label for="">
<span class='radio-name'>后台工程师</span>
<input type='radio' name='radioName' id='radioName2' hidden/>
<label for="radioName2" class='radio-beauty'></label>
</label>
<label for="">
<span class='radio-name'>全栈工程师</span>
<input type='radio' name='radioName' id='radioName3' hidden/>
<label for="radioName3" class='radio-beauty'></label>
</label>
</div>
</body>
</html>