본문 바로가기
Js

smoothwheel, 부드러운 마우스 스크롤

by 영감은어디에 2025. 3. 11.

https://github.com/fatlinesofcode/jquery.smoothwheel

 

GitHub - fatlinesofcode/jquery.smoothwheel: Cross browser smooth mouse wheel and trackpad scrolling

Cross browser smooth mouse wheel and trackpad scrolling - fatlinesofcode/jquery.smoothwheel

github.com

<!DOCTYPE HTML>
<html>
<head>
    <meta charset="utf-8">
    <style>
        #wrapper{
            background: black;
            width:800px;
            height:600px;
            overflow:auto;
            -webkit-overflow-scrolling: touch;
            position:relative;
        }
        #container{
            height:2000px;
            background:blue;
            width:750px;
            position:absolute;
        }
        .box{
            width:100px;
            height:100px;
            background:red;
            position:absolute;
        }
        #box1{
            top:50px;
            left:200px;
        }
        #box2{
            top:350px;
            left:400px;
        }
        #box3{
            bottom:20px;
            left:400px;
        }


    </style>
    <script src="//ajax.googleapis.com/ajax/libs/jquery/1.8.1/jquery.min.js"></script>
    <script src="../src/jquery.smoothwheel.js"></script>

    <script>

        $(document).ready(function(){
            $("#wrapper").smoothWheel()
        });

    </script>
</head>
<div id="wrapper">
    <div id="container">

        <div id="box1" class="box"></div>
        <div id="box2" class="box"></div>
        <div id="box3" class="box"></div>

    </div>
</div>

</html>

'Js' 카테고리의 다른 글

gsap, hue-rotate, mousemove  (0) 2025.03.15
wow.js animate  (0) 2025.03.09
rotate, mouse move, delay  (0) 2025.03.07
circle, strokeDashoffset, scrollTop, 그래프  (0) 2025.03.06
gsap, mouse move  (0) 2025.03.05
원페이지 스크롤  (0) 2025.03.03
menu bar mouse move  (0) 2025.02.25
폴리곤. 컬러 로테이션 hue-rotate  (0) 2025.02.24