Advertisement
talas

customised scrollbar

May 3rd, 2021
246
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.82 KB | None | 0 0
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <title>My Example</title>
  5. <!-- CSS -->
  6. <style>
  7. /* Box styles */
  8. .myBox {
  9. border: none;
  10. padding: 5px;
  11. font: 24px/36px sans-serif;
  12. width: 250px;
  13. height: 250px;
  14. overflow: scroll;
  15. overflow-x: hidden;
  16. overflow-y: scroll;
  17. }
  18. /* Scrollbar styles */
  19. ::-webkit-scrollbar {
  20. width: 12px;
  21. height: 12px;
  22. }
  23. ::-webkit-scrollbar-track {
  24. border: 1px solid #000;
  25. border-radius: 10px;
  26. }
  27. ::-webkit-scrollbar-thumb {
  28. background: #000;
  29. border-radius: 10px;
  30. }
  31. ::-webkit-scrollbar-thumb:hover {
  32. background: pink;
  33. }
  34. </style>
  35. </head>
  36. <body>
  37. <!-- HTML -->
  38. <div class="myBox">
  39. <p>Put your text here.</p>
  40. <p>Please credit me (@baeyhkun on twt) if used.</p>
  41. Text text text text text text
  42. text text text text text text
  43. text text text text text text
  44. text text text text text text
  45. </div>
  46. </body>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement