Answers for "css in js hide scrollbar"

CSS
0

hgow to hide scroll bar and add buttons in javascript

.scoll-pane {
    width: 100%;
    height: auto;
    overflow: auto;
    outline: none;
    overflow-y: hidden;
    padding-bottom: 15px;
    -ms-overflow-style: scroll;  // IE 10+
    scrollbar-width: none;  // Firefox
}

ul {
    display: flex;
    list-style-type: none;
    padding: 0;
    margin: 0;
}

img {
    width: 300px;
    height: 180px;
}

  .scoll-pane::-webkit-scrollbar { 
  display: none;  // Safari and Chrome
  }
Posted by: Guest on September-21-2020
-1

javascript hide scrollbar

function HideScrollbar() {
  var style = document.createElement("style");
  style.innerHTML = `body::-webkit-scrollbar {display: none;}`;
  document.head.appendChild(style);
}
Posted by: Guest on June-22-2020

Browse Popular Code Answers by Language