forked from qianlongo/cssSkills
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcssMask.html
53 lines (46 loc) · 868 Bytes
/
cssMask.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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>css mask</title>
<style>
#outerWrapper {
width: 450px;
height: 90px;
padding: 10px;
margin: 100px auto 0 auto;
border-radius: 55px;
box-shadow: 0 0 10px 6px #EAEBED;
background: #fff;
}
#innerWrapper {
height: 100%;
border-radius: 45px;
overflow: hidden;
position: relative;
}
.radio {
width: 90px;
height: 100%;
position: absolute;
margin: 0;
opacity: 0;
}
#rightRadio {
right: 0;
}
.radio:not(:checked) {
cursor: pointer;
background-color: red;
}
</style>
</head>
<body>
<div id="outerWrapper">
<div id="innerWrapper">
<input type="radio" id="leftRadio" class="radio" name="radio" />
<input type="radio" id="rightRadio" class="radio" name="radio" checked />
</div>
</div>
</body>
</html>