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 :: css disabled div 
Css :: css smooth transition in and out 
Css :: css box shadow right and down 
Css :: css change if mobile 
Css :: html scrollable without scroll bar 
Css :: css blur text 
Css :: box shadow top and bottom only 
Css :: border box reset 
Css :: css change image color 
Css :: css div side rounded 
Css :: how to create a glass-polymorphism effect 
Css :: christmas red color code 
Css :: remove button default border css 
Css :: css for internet explorer only 
Css :: add padding to gnome terminal 
Css :: css border top 
Css :: background gradient problem 
Css :: link to css file within another css file 
Css :: minmax in grid 
Css :: how to link css to html in visual studio code 
Css :: imporatn css 
Css :: css display div horizontally 
Css :: background-color not showing grover pdf 
Css :: two background css 
Css :: backdrop filter property for safari not working 
Css :: how to write remark in css 
Css :: how to make image same size as text css 
Css :: background degrade 
Css :: css system default font 
Css :: Push an existing folder to git 
ADD CONTENT
Topic
Content
Source link
Name
1+4 =