按钮模版:btn-10

效果展示

实现思路

实现代码

1
<button class="btn-9"><span>BTN-9</span></button>
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
.btn-10 {
position: relative;
width: 120px;
height: 60px;
line-height: 60px;
padding: 0;
color: #fff;
background: linear-gradient(0deg, rgba(255, 151, 0, 1) 0%, rgba(251, 75, 2, 1) 100%);
transition: all 0.3s ease;
border: none;
cursor: pointer;
}
.btn-10 span {
position: relative;
display: block;
width: 100%;
height: 100%;
}
.btn-10:before,
.btn-10:after {
position: absolute;
content: "";
right: 0;
bottom: 0;
background: rgba(251, 75, 2, 1);
box-shadow:
-7px -7px 20px 0px rgba(255, 255, 255, .9),
-4px -4px 5px 0px rgba(255, 255, 255, .9),
7px 7px 20px 0px rgba(0, 0, 0, .2),
4px 4px 5px 0px rgba(0, 0, 0, .3);
transition: all 0.3s ease;
}
.btn-10:before {
height: 0%;
width: 2px;
}
.btn-10:after {
width: 0%;
height: 2px;
}
.btn-10:hover {
color: rgba(251, 75, 2, 1);
background: transparent;
}
.btn-10:hover:before {
height: 100%;
}
.btn-10:hover:after {
width: 100%;
}
.btn-10 span:before,
.btn-10 span:after {
position: absolute;
content: "";
left: 0;
top: 0;
background: rgba(251, 75, 2, 1);
box-shadow:
-7px -7px 20px 0px rgba(255, 255, 255, .9),
-4px -4px 5px 0px rgba(255, 255, 255, .9),
7px 7px 20px 0px rgba(0, 0, 0, .2),
4px 4px 5px 0px rgba(0, 0, 0, .3);
transition: all 0.3s ease;
}
.btn-10 span:before {
width: 2px;
height: 0%;
}
.btn-10 span:after {
height: 2px;
width: 0%;
}
.btn-10 span:hover:before {
height: 100%;
}
.btn-10 span:hover:after {
width: 100%;
}