# CSS_Hover
<div class="middle">
<a class="btn" href="">
<i class="fa fa-facebook-f"></i>
</a>
<a class="btn" href="">
<i class="fa fa-twitter"></i>
</a>
<a class="btn" href="">
<i class="fa fa-instagram"></i>
</a>
<a class="btn" href="">
<i class="fa fa-google-plus"></i>
</a>
</div>
1
2
3
4
5
6
7
8
9
10
11
12
13
14
2
3
4
5
6
7
8
9
10
11
12
13
14
body {
margin:0;
padding:0;
background: #303030;
}
.middle {
margin:0;
padding:0;
position: absolute;
top:50%;
transform: translateY(-50%);
width: 100%;
text-align: center;
}
.btn {
display:inline-block;
width:60px;
height: 60px;
background: #f1f1f1;
margin: 10px;
border-radius: 30%;
box-shadow:-5px 5px 15px -5px #f1f1f1;
overflow: hidden;
position: relative;
transition: 0.3s linear;
}
.btn i {
line-height: 60px;
font-size: 26px;
transition: 0.3s linear;
}
.btn:nth-child(1) i {
color:#3b5998;
}
.btn:nth-child(2) i {
color:#1da1f2;
}
.btn:nth-child(3) i {
color:#c32aa3;
}
.btn:nth-child(4) i {
color:#db4437;
}
.btn:hover {
transform: scale(1.1);
}
.btn:hover i {
transform: scale(1.2);
color: #fff;
}
.btn:before {
content:"";
position:absolute;
width:120%;
height:120%;
transform: rotate(45deg);
left: -110%;
top:90%;
}
.btn:nth-child(1)::before {
background: #3b5998;
}
.btn:nth-child(2)::before {
background: #1da1f2;
}
.btn:nth-child(3)::before {
background: #c32aa3;
}
.btn:nth-child(4)::before {
background: #db4437;
}
.btn:hover::before {
animation: aaa 0.7s 1;
top: -10%;
left: -10%;
}
@keyframes aaa {
0% {
left: -110%;
top:90%;
}
50% {
left:10%;
top: -30%;
}
100% {
left: -10%;
top: -10%;
}
}
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
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