Open yyman001 opened 6 years ago
getScrollSize (){ // Create the measurement node var scrollDiv = document.createElement("div") scrollDiv.className = "scrollbar-size" // scrollDiv.style.overflow = 'scroll' document.body.appendChild(scrollDiv) // Get the scrollbar width this.scrollSize = scrollDiv.offsetWidth - scrollDiv.clientWidth // Mac: 15 // Delete the DIV document.body.removeChild(scrollDiv) this.zoomBarStyle.right = this.scrollSize + 'px' this.zoomBarStyle.bottom = this.scrollSize + 'px' console.warn('this.zoomBarStyle:', this.zoomBarStyle) },
https://davidwalsh.name/detect-scrollbar-width http://blog.csdn.net/hdchangchang/article/details/8251610
https://davidwalsh.name/detect-scrollbar-width http://blog.csdn.net/hdchangchang/article/details/8251610