-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbacktoscroll.css
67 lines (59 loc) · 1.63 KB
/
backtoscroll.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
#button {
display: inline-block;
background-color: rgba(127, 191, 214, 0.393);
width: 60px;
height: 60px;
text-align: center;
border-radius: 50px;
position: fixed;
bottom: 30px;
right: 30px;
transition: background-color .3s,
opacity .5s, visibility .5s;
opacity: 0;
visibility: hidden;
z-index: 1000;
}
#button::after {
content: "";
font-family: FontAwesome;
font-weight: normal;
font-style: normal;
font-size: 2em;
line-height: 50px;
color: #fff;
}
#button:hover {
cursor: pointer;
background-color:rgb(255, 115, 92);
animation: shake 0.5s;
animation-iteration-count: infinite;
}
#button:active {
background-color: #555;
}
#button.show {
opacity: 1;
visibility: visible;
}
.fa-arrow-up{
background-color:transparent;
color: white;
font-size: 20px;
}
.fa-arrow-up:hover{
color: white;
}
@keyframes shake {
0% { transform: translate(1px, 1px) rotate(0deg); }
10% { transform: translate(-1px, -2px) rotate(-1deg); }
20% { transform: translate(-3px, 0px) rotate(1deg); }
30% { transform: translate(3px, 2px) rotate(0deg); }
40% { transform: translate(1px, -1px) rotate(1deg); }
50% { transform: translate(-1px, 2px) rotate(-1deg); }
60% { transform: translate(-3px, 1px) rotate(0deg); }
70% { transform: translate(3px, 1px) rotate(-1deg); }
80% { transform: translate(-1px, -1px) rotate(1deg); }
90% { transform: translate(1px, 2px) rotate(0deg); }
100% { transform: translate(1px, -2px) rotate(-1deg); }
}