크롬 스크롤바 css 적용하는법 문의요~
본문
첨부파일에 보면 div 내에 작은 스크롤바가 있고
기본 스크롤바가 있는데,
여기서 기본스크롤바는 기본그대로 냅두고,
작은 div 의 스크롤바에 css 효과를 주고 싶은데요
webkit 소스를 넣으면
기본스크롤까지 영향을 받아서
크롬에서 따로 css를 줄수있는 방법은 없나요 ?
::-webkit-scrollbar {width: 2px; height: 12px; }
::-webkit-scrollbar-button:start:decrement,
::-webkit-scrollbar-button:end:increment {display: block; width: 12px;height: 12px; background: url() rgba(0,0,0,.05);}
::-webkit-scrollbar-track { background:rgba(0,0,0, 0.9) /* background:#000; rgba(0,0,0,.0.8);*/ }
::-webkit-scrollbar-thumb { background:rgba(255,255,255, 0.9)/* background:#fff rgba(0,0,0,.1);*/ }
답변 1
div::-webkit-scrollbar {width: 2px; height: 12px; }
div::-webkit-scrollbar-button:start:decrement,
div::-webkit-scrollbar-button:end:increment {display: block; width: 12px;height: 12px; background: url() rgba(0,0,0,.05);}
div::-webkit-scrollbar-track { background:rgba(0,0,0, 0.9) /* background:#000; rgba(0,0,0,.0.8);*/ }
div::-webkit-scrollbar-thumb { background:rgba(255,255,255, 0.9)/* background:#fff rgba(0,0,0,.1);*/ }