Search
 
SCRIPT & CODE EXAMPLE
 

CSS

set scrollbar width css

::-webkit-scrollbar {
    width: 2em;
    height: 2em
}
::-webkit-scrollbar-button {
    background: #ccc
}
::-webkit-scrollbar-track-piece {
    background: #888
}
::-webkit-scrollbar-thumb {
    background: #eee
}​
Comment

css scrollbar width

/* The syntax, with all the available styling */
(selected-element)::-webkit-scrollbar {
  width: 16px;
  background: transparent;
  display: none;
}
(selected-element)::-webkit-scrollbar-track {
  background: whitesmoke;
  border-radius: 3px;
}
(selected-element)::-webkit-scrollbar-thumb {
  background: tomato;
  border-radius: 10px;
}

/* A modern way of doing this */
selected-element {
  scrollbar-width: thin; /* 'thin' or any usual number measurements like '5px' */
  scrollbar-color: <thumb-color> <track-color>; /* Use normal color system i.e rgb or hex or hsl */
}
Comment

get scrollbar width css

let scrollbarWidth = (window.innerWidth - document.body.clientWidth) + 'px';
Comment

scrollbar width css

::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    -webkit-box-shadow: inset 0 0 6px rgba(0,0,0,0.3);
}

::-webkit-scrollbar-thumb {
  background-color: darkgrey;
  outline: 1px solid slategrey;
}
Comment

PREVIOUS NEXT
Code Example
Css :: react bootstrap carousel not working 
Css :: bottom gradient 
Css :: fira code 
Css :: Error: Could not find "stylelint-csstree-validator" 
Css :: rounded left border tailwind css 
Css :: internal style 
Css :: remove clicked button border 
Css :: css td vertical align 
Css :: Media Query Smartphone Portrait 
Css :: How do I make my background color darker in CSS 
Css :: html css disabled button hover style 
Css :: bulma uppercase 
Css :: css button click animation 
Css :: remove outline on button click 
Css :: webkit box shadow not working 
Css :: CSS Text Shadow Effect( cool) 
Css :: scss select all childs 
Css :: width 33 css 
Css :: alert without page refresh 
Css :: css grid responsive 
Css :: resize any element in CSS 
Css :: html css bring to page top 
Css :: input backgound color 
Css :: value error w2 should be positive but is 
Css :: html checkbox change styling 
Css :: line icon css 
Css :: Heart Shape Html And Css 
Css :: animate.css not working 
Css :: variables css 
Css :: css span to right of div 
ADD CONTENT
Topic
Content
Source link
Name
6+1 =