diff --git a/index.html b/index.html index c64d578b8..ae459f380 100644 --- a/index.html +++ b/index.html @@ -31,7 +31,6 @@ Overflow scroll gradient Popout menu Pretty text underline - Scrollbars styling Shape separator System font stack Triangle @@ -919,76 +918,6 @@ var y = e.pageY - btn.offsetTop - btn.offsetParent.offsetTop -
-

Scrollbars styling

-

Customise scrollbars style for the document and elements with overflow scrollable, on webkit platforms.

-

HTML

<div class="custom-scroll">
-  <p>Lorem ipsum dolor sit amet consectetur adipisicing elit. Iure id exercitationem nulla qui repellat laborum vitae, molestias tempora velit natus. Quas, assumenda nisi. Quisquam enim qui iure, consequatur velit sit?</p>
-</div>
-
-

CSS

::-webkit-scrollbar {
-  width: 8px;
-}
-::-webkit-scrollbar-track {
-  box-shadow: inset 0 0 6px rgba(0,0,0,0.3);
-  border-radius: 10px;
-}
-::-webkit-scrollbar-thumb {
-  border-radius: 10px;
-  box-shadow: inset 0 0 6px rgba(0,0,0,0.5);
-}
-
-

Demo

-
-
-

- Lorem ipsum dolor sit amet consectetur adipisicing elit. Iure id exercitationem nulla qui repellat laborum vitae, molestias tempora velit natus. Quas, assumenda nisi. Quisquam enim qui iure, consequatur velit sit? -

-

- Lorem ipsum dolor sit amet consectetur adipisicing elit. Iure id exercitationem nulla qui repellat laborum vitae, molestias tempora velit natus. Quas, assumenda nisi. Quisquam enim qui iure, consequatur velit sit? -

-
-
- -

Explanation

-
    -
  1. ::-webkit-scrollbar target the whole scrollbar element.
  2. -
  3. ::-webkit-scrollbar-track target only the scrollbar track.
  4. -
  5. ::-webkit-scrollbar-thumb Allow you to target and style the scrollbar thumb.
  6. -
-

There are many other pseudo elements that you can use to style scrollbars. More info about this on the - WebKit Blog -

-

Browser support

-
-
- 87.3% -
-
-

⚠️ Currently scrollbar styling doesn't appear to be on any standards track. -

- -

Shape separator

Uses an SVG shape to separate two different blocks to create more a interesting visual appearance compared to standard horizontal separation.

@@ -1213,4 +1142,4 @@ var y = e.pageY - btn.offsetTop - btn.offsetParent.offsetTop
- + \ No newline at end of file