-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathstyle.css
117 lines (114 loc) · 2.43 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
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
body{
margin: 0;
padding: 0;
font-family: sans-serif;
background:#000;
}
.box{
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%,-50%);
width: 300px;
height: 300px;
box-sizing: border-box;
cursor: pointer;
}
.box:before{
content: '';
position: absolute;
top: 0;
left: 0;
width: 100%;
height:100%;
border: none;
border-top: 4px solid #58c747;
border-bottom: 4px solid #58c747;
box-sizing: border-box;
transform: scaleX(0);
transition: 0.5s;
}
.box:hover:before{
transform: scaleX(1);
transition-delay: 0.5s;
}
.box:after{
content: '';
position: absolute;
top: 0;
left: 0;
width: 100%;
height:100%;
border: none;
border-left: 4px solid #58c747;
border-right: 4px solid #58c747;
box-sizing: border-box;
transform: scaleY(0);
transition: 0.5s;
}
.box:hover:after{
transform: scaleY(1);
}
.box h1{
margin: 0;
padding:0;
color:#fff;
position: absolute;
top: 50%;
transform:translateY(-50%);
width: 100%;
text-align: center;
font-size: 35px;
z-index: 1;
}
.box h1 span{
font-size: 40px;
display: block;
color: #58c747;
}
.box span.border
{
position: absolute;
width: 100%;
height: 100%;
display: block;
transform: rotate(45deg);
box-sizing: border-box;
pointer-events: none;
}
.box span.border:before{
content: '';
position: absolute;
top: 0;
left: 0;
width: 100%;
height:100%;
border: none;
border-top: 4px solid #58c747;
border-bottom: 4px solid #58c747;
box-sizing: border-box;
transform: scaleX(0);
transition: 0.5s;
}
.box:hover span.border:before{
transform: scaleX(1);
transition-delay: 1s;
}
.box span.border:after{
content: '';
position: absolute;
top: 0;
left: 0;
width: 100%;
height:100%;
border: none;
border-left: 4px solid #58c747;
border-right: 4px solid #58c747;
box-sizing: border-box;
transform: scaleY(0);
transition: 0.5s;
}
.box:hover span.border:after{
transform: scaleY(1);
transition-delay: 1.5s;
}