Image zoom on hover effect || HTML , Css, jquery

Image zoom on hover effect || HTML , Css, jquery

image zoom on hover effect || HTML , Css, jquery


image zoom on hover effect || HTML , Css, jquery


Hello friends, In this post we know about how to make Image zoom on hover effect with HTML , Css, jquery.


<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Ok Zoom </title>
    <style>
        body{
            height100vh;
            width100vw;
        }
        img {
            positionrelative;
            top:50%;
            left:50%;
            transformtranslate(-50%,-50%);
            height300px;
            width400px;
        }
    </style>
</head>

<body>
    <img src="https://picsum.photos/800/600" alt="">

    <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.6.0/jquery.slim.js"></script>
    <script src="http://okfoc.us/okzoom/src/okzoom-1.0.min.js"></script>

    <script>
        $(document).ready(function(){
            $('img').okzoom({
                width: 200,
                height: 200,
                scaleWidth: 800,
                round: true,
                background: "#fff",
                // backgroundRepeat: "repeat",
                shadow: "0 0 5px #000",
                border: "1px solid black"
                });
        })
    </script>

</body>

</html>