-
Notifications
You must be signed in to change notification settings - Fork 1
/
style.css
94 lines (76 loc) · 1.5 KB
/
style.css
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
body {
margin: 0;
padding: 0;
font-family: 'Gill Sans', 'Gill Sans MT', Calibri, 'Trebuchet MS', sans-serif;
background-color: antiquewhite;
}
.hvr-btn {
/* Placing button in center */
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
/* Button Styling */
width: 100px;
height: 60px;
text-decoration: none;
background-color: #f6ff76;
text-align: center;
line-height: 60px;
text-transform: uppercase;
color: darkmagenta;
letter-spacing: 1px;
overflow: hidden;
}
.hvr-btn span {
display: block;
background-color: darkmagenta;
transition: all .2s ease-in-out;
}
.hvr-btn span:nth-child(odd) {
position: absolute;
height: 2px;
width: 100%;
}
.hvr-btn span:nth-child(even) {
position: absolute;
height: 100%;
width: 2px;
}
/* Custom Border Default Positioning */
.hvr-btn span:nth-child(1) {
top: 0;
left: -100%;
}
.hvr-btn span:nth-child(2) {
top: -100%;
right: 0;
}
.hvr-btn span:nth-child(3) {
bottom: 0;
right: -100%;
}
.hvr-btn span:nth-child(4) {
bottom: -100%;
left: 0;
}
/* Custom Border Hover Effect */
.hvr-btn:hover span:nth-child(1) {
top: 0;
left: 0;
}
.hvr-btn:hover span:nth-child(2) {
top: 0;
right: 0;
transition-delay: .2s;
}
.hvr-btn:hover span:nth-child(3) {
bottom: 0;
right: 0;
transition-delay: .4s;
}
.hvr-btn:hover span:nth-child(4) {
bottom: 0;
left: 0;
transition-delay: .6s;
}