-
Notifications
You must be signed in to change notification settings - Fork 0
/
chrome-tab.html
87 lines (76 loc) · 1.72 KB
/
chrome-tab.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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
<!DOCTYPE html>
<html lang="en">
<head>
<script src="https://unpkg.com/vconsole@latest/dist/vconsole.min.js"></script>
<script>
// VConsole 会自动挂载到 `window.VConsole`
var vConsole = new window.VConsole();
</script>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
<style>
.tab {
display: flex;
background-color: #EFC0B8;
padding: 10px 15px 0 15px;
font-size: 14px;
}
.tab-item {
position: relative;
background-color: transparent;
padding: 10px 15px;
border-radius: 12px 12px 0 0;
cursor: pointer;
transition: .2s;
}
.tab-item::before,
.tab-item::after {
position: absolute;
bottom: 0;
content: '';
width: 20px;
height: 20px;
border-radius: 100%;
box-shadow: 0 0 0 40px transparent;
transition: .2s;
}
.tab-item::before {
left: -20px;
clip-path: inset(50% -10px 0 50%);
}
.tab-item::after {
right: -20px;
clip-path: inset(50% 50% 0 -10px);
}
.tab-item:hover {
/* background-color: #F2D0CA; */
background: rgba(255, 255, 255, .8);
/* color: #000; */
}
.tab-item:hover::before,
.tab-item:hover::after {
box-shadow: 0 0 0 30px #F2D0CA;
}
.tab-item.active {
background-color: #F8EAE7;
/* background: rbga(255, 255, 255, .2); */
z-index: 1;
/* color: #000; */
}
.tab-item.active::before,
.tab-item.active::after {
box-shadow: 0 0 0 30px #F8EAE7;
}
</style>
</head>
<body>
<nav class="ta-b">
<a class="tab-item">测试测试</a>
<a class="tab-item active">测试测试</a>
<a class="tab-item">测试测试</a>
<a class="tab-item">测试测试</a>
</nav>
</body>
</html>