script
// 스크롤바 숨기고 동작안하게 했다가 풀기
$("header").toggleClass("active");
if ($("header").hasClass("active")) {
$("header").on("scroll touchmove mousewheel", function (event) {
event.preventDefault();
event.stopPropagation();
return false;
});
} else {
$("header").off("scroll touchmove mousewheel");
}
$("body").toggleClass("scrollBar");
css
.scrollBar {
-ms-overflow-style: none; /* IE and Edge */
scrollbar-width: none; /* Firefox */
&::-webkit-scrollbar {
display: none; /* Chrome, Safari, Opera*/
}
}
'코드정리' 카테고리의 다른 글
[sass] 반복되는 이미지 삽입 (0) | 2022.12.17 |
---|---|
드래그 막기 (0) | 2022.12.17 |
텍스트 말줄임 (0) | 2022.12.17 |
a href='#' 클릭 무시 (0) | 2022.12.17 |
파비콘 설정 (0) | 2022.12.17 |