-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path按钮鼠标悬停.html
113 lines (112 loc) · 2.96 KB
/
按钮鼠标悬停.html
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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>按钮鼠标悬停</title>
<link
rel="stylesheet"
href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css"
/>
<style>
* {
margin: 0;
padding: 0;
}
body {
display: flex;
justify-content: center;
align-items: center;
height: 100vh;
background-color: #eeeeee;
}
.container {
display: flex;
}
.container .btn {
overflow: hidden;
position: relative;
width: 90px;
height: 90px;
text-align: center;
margin: 0 10px;
border-radius: 25px;
background-color: #ffffff;
box-shadow: 0 5px 15px -5px rgba(0, 0, 0, 0.1);
}
.container .fa {
font-size: 38px;
transform: scale(0.8);
line-height: 90px;
transition: all 0.4s cubic-bezier(0.31, -0.1, 0.43, 1.59);
}
.container .btn::before {
content: "";
position: absolute;
top: 90%;
right: -100%;
width: 120%;
height: 120%;
transform: rotate(45deg);
transition: all 0.35s cubic-bezier(0.31, -0.1, 0.43, 1.59);
}
.container .btn:hover::before {
top: -10%;
right: -10%;
}
.container .btn:hover .fa {
color: #fff;
transform: scale(1);
}
.container .btn .fa-facebook {
color: #3b5988;
}
.container .btn_facebook::before {
background-color: #3b5988;
}
.container .btn .fa-twitter {
color: #00aff0;
}
.container .btn_twitter::before {
background-color: #00aff0;
}
.container .btn .fa-wechat {
color: #1aad19;
}
.container .btn_wechat::before {
background-color: #1aad19;
}
.container .btn .fa-instagram {
color: #bf00ff;
}
.container .btn_instagram::before {
background-color: #bf00ff;
}
.container .btn .fa-qq {
color: #ea1c27;
}
.container .btn_qq::before {
background-color: #ea1c27;
}
</style>
</head>
<body>
<div class="container">
<a href="javascript:void(0)" class="btn btn_facebook"
><i class="fa fa-facebook"></i
></a>
<a href="javascript:void(0)" class="btn btn_twitter"
><i class="fa fa-twitter"></i
></a>
<a href="javascript:void(0)" class="btn btn_qq"
><i class="fa fa-qq"></i
></a>
<a href="javascript:void(0)" class="btn btn_wechat"
><i class="fa fa-wechat"></i
></a>
<a href="javascript:void(0)" class="btn btn_instagram"
><i class="fa fa-instagram"></i
></a>
</div>
</body>
</html>