Repository navigation
Expand file tree
/
Copy pathscrollbar2.html
More file actions
62 lines (53 loc) · 1.66 KB
/
Copy pathscrollbar2.html
File metadata and controls
62 lines (53 loc) · 1.66 KB
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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Visible Custom Scrollbar Example</title>
<style>
body {
background: #f0f0f0;
font-family: sans-serif;
padding: 20px;
}
.scroll {
width: 300px;
height: 200px;
border: 2px solid #000;
padding: 10px;
overflow-y: scroll;
background: #fff;
}
/* Always visible parts (modern Chrome safe) */
.scroll::-webkit-scrollbar {
width: 14px;
}
.scroll::-webkit-scrollbar-track {
background: #ddd;
border-radius: 10px;
}
.scroll::-webkit-scrollbar-thumb {
background: linear-gradient(180deg, #ff8a00, #2e3de5);
border-radius: 10px;
}
.scroll::-webkit-scrollbar-thumb:hover {
background: linear-gradient(180deg, #ff5500, #b51e5c);
}
/* Firefox support */
.scroll {
scrollbar-width: thin; /* auto, none, thin */
scrollbar-color: #e52e71 #ddd;
}
</style>
</head>
<body>
<h2>🔥 Visible Custom Scrollbar (Modern Chrome Compatible)</h2>
<div class="scroll">
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec vel sagittis justo.</p>
<p>Aliquam erat volutpat. Integer sit amet sapien sed metus mattis iaculis.</p>
<p>Vivamus suscipit interdum elit, in tincidunt magna lacinia eget. Integer sit amet sapien sed metus mattis iaculis.</p>
<p>Morbi id nulla urna. Donec ac nisi sit amet orci posuere feugiat vel sed odio.</p>
<p>Suspendisse potenti. Vestibulum fringilla, mi vel accumsan faucibus, nisi erat sodales erat.</p>
</div>
</body>
</html>