forked from ML-Fusion-Lab/ML-Fusion-Lab-Website
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathscroll.css
37 lines (32 loc) · 980 Bytes
/
scroll.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
#scrollTopBtn {
position: fixed;
bottom: 20px;
right: 20px;
display: none; /* Hidden by default */
/* Circular shape */
width: 60px;
height: 60px;
border-radius: 50%;
background-color: #ffffff;
color: #000000;
border: none;
font-size: 20px;
text-align: center;
line-height: 60px;
/* Add a subtle shadow */
box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.15);
cursor: pointer;
z-index: 100;
transition: background-color 0.3s, box-shadow 0.3s;
}
/* Hover Effect */
#scrollTopBtn:hover {
background-color: #f1f1f1; /* Slightly darker background on hover */
box-shadow: 0px 6px 12px rgba(0, 0, 0, 0.25); /* Stronger shadow on hover */
transform: translateY(-2px); /* Makes it look like it lifts up slightly */
}
/* Optional: Add a focus effect (for accessibility) */
#scrollTopBtn:focus {
outline: none;
box-shadow: 0px 0px 0px 4px rgba(100, 100, 250, 0.5); /* Focus ring */
}