# 扩大可点击区域
<style scoped>
.main {
width: 100%;
padding: 60px 0;
display: flex;
align-items: center;
flex-wrap: wrap;
user-select: none;
}
.main > div {
display: flex;
flex: 1;
flex-direction: column;
justify-content: space-between;
align-items: center;
}
.main > div:nth-of-type(4) {
height: 81px;
padding-top: 8px;
}
.main > div > a.btn {
display: flex;
justify-content: center;
align-items: center;
width: 66px; height: 66px;
color: #fff;
font-weight: 600px;
border-radius: 50%;
cursor: pointer;
border: 8px solid transparent;
background: #b4a078 padding-box;
}
.main > div > a.btn:active {
background: rgba(180,160,120,.8) padding-box;
}
.main > div > span {
display: flex;
justify-content: center;
font-size: 13px;
color: #999;
}
.main > div:nth-of-type(2) a.btn {
color: #b4a078;
background: #FFF;
box-shadow: 0 0 0 1px #b4a078 inset;
}
.main > div:nth-of-type(2) a.btn:active {
background: rgba(180,160,120,.1) padding-box;
}
.main > div:nth-of-type(3) a.btn {
box-shadow: 0 0 0 1px #b4a078 inset;
filter: drop-shadow(1px 1px 2px rgba(0, 0, 0, .3))
}
.main > div:nth-of-type(4) a.btn {
position: relative;
width: 50px; height: 50px;
border: 0;
background-clip: border-box;
box-shadow: 1px 1px 2px rgba(0,0,0,.3);
}
.main > div:nth-of-type(4) a.btn::before {
content: "";
position: absolute;
top: -8px; right: -8px;
bottom: -8px; left: -8px;
}
.main > div:nth-of-type(5) a.btn {
color: #b4a078;
background-color: #FFF;
box-shadow: 0 0 0 1px #b4a078 inset;
filter: drop-shadow(1px 1px 2px rgba(0, 0, 0, .3));
}
.main > div:nth-of-type(5) a.btn:active {
filter: drop-shadow(1px 1px 2px rgba(0, 0, 0, 0));
}
</style>
<template>
<div class="main">
<div>
<a class="btn">+</a><span>normal</span>
</div>
<div>
<a class="btn">+</a><span>border</span>
</div>
<div>
<a class="btn">+</a><span>shadow filter</span>
</div>
<div>
<a class="btn">+</a><span>shadow :before</span>
</div>
<div>
<a class="btn">+</a><span>border shadow</span>
</div>
</div>
</template>
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
88
89
90
91
92
93
94
95
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
88
89
90
91
92
93
94
95