이 글에서는 H5 스크롤바 스타일을 구성하기 위한 샘플 코드를 소개하고, 자세한 내용은 다음과 같습니다.
/* 스크롤 막대 슬라이더의 배경색 */::-webkit-scrollbar-track { background-color: #b46868;}/* 슬라이더의 색상 */::-webkit-scrollbar-thumb { background-color : rgba( 0, 0, 0, 0.2);} /* 슬라이드 레일 양쪽 끝에 있는 청취 버튼 색상*/::-webkit-scrollbar-button { background-color: #7c2929;}/* 가로 스크롤 막대와 세로 스크롤 막대의 교차점의 날카로운 모서리 색상*/::-webkit-scrollbar-corner { background-color: black;} // IE 자체 설정 방법, 스크롤 막대를 사용자 정의할 수 있는 첫 번째 브라우저는 IE5.5부터 body { scrollbar-face-color: #b46868;}와 호환됩니다. 예 /* Document scrollbar */::-webkit-scrollbar { width: 8px;}::-webkit-scrollbar-track { 상자 그림자: 삽입 0 0 6px rgba(0, 0, 0, 0.3); 테두리 반경: 10px;}::-webkit-scrollbar-thumb { 테두리 반경 : 10px; 상자 그림자: 삽입 0 0 6px rgba(0, 0, 0, 0.5);}/* 스크롤 가능 요소 */.some-element::webkit-scrollbar {}<div class=custom-scrollbar> <p> Lorem ipsum dolor sit amet consectetur adipisicing elit. Iure id exercitationem nulla qui repellat Laborum vitae, Molestias tempora velit natus. Quisquam enim. 확실히, 결과는 어떻습니까? </p></div>위의 내용은 이 기사의 전체 내용입니다. 모든 분들의 학습에 도움이 되기를 바랍니다. 또한 모든 분들이 VeVb Wulin Network를 지지해 주시길 바랍니다.