HTML CSS & JAVASCRIPT, YouTube

Custom Cursor Hover Animation

Custom Cursor Hover Animation

Coding BD given Custom Cursor Hover Animation. You can create a custom cursor for the website. We create custom mouse cursor. It is the most important part Of mousemove animation html css javascript. We have given more importance to the cursor hover effect css. They used pure css effects. because they need highly effective effects. Thank you so much.

😍😍 If You like this video Please like, share and subscribe This video.😍😍

😍😍 Check Others Programming Video👇

➡️ creative button hover effects: https://www.youtube.com/watch?v=3FbyiuhhhTI

➡️ How to Download Source code in Coding BD: https://www.youtube.com/watch?v=WXAZ-BScKBE&t=3s

➡️Responsive website html css javascript | part( 1 ): https://www.youtube.com/watch?v=g0ART…

➡️ Responsive Services Section: https://www.youtube.com/watch?v=wvLky…

➡️ CSS Clip Path Hover Circle Hover Effects: https://www.youtube.com/watch?v=cRSgo…

➡️ CSS Responsive CARD Hover Effects & Adding Stroke to Text | Html5 CSS3 2021: https://www.youtube.com/watch?v=QVMJ5…

➡️ Neon Light Button Animation Effects on Hover | CSS Snake Border: https://www.youtube.com/watch?v=GtVSF…

➡️ Responsive Box Model Web Design Using CSS Flexbox: https://www.youtube.com/watch?v=03RuV…

➡️ Digital Clock with Animated Progress-bar | HTML CSS & Vanilla Javascript: https://www.youtube.com/watch?v=6A6Hp…

➡️ How to create a light to dark mode for HTML CSS & Vanilla Javascript 2021: https://www.youtube.com/watch?v=43FbR…

➡️Scroll top button : https://www.youtube.com/watch?v=9fDEJ…

➡️ Animated eid mubarak 2021 using Html CSS & Javascript: https://www.youtube.com/watch?v=60H2g…

Here is all Source code ( Cursor Hover Animation ). You can follow this steps:

  1. Create 1 folder
  2. create 1 HTML file: index.html
  3. create 1 CSS file: style.css
  4. copy HTML code and pest HTML file, copy CSS code and past CSS file
  5. Now give a smile and jump out loud. 😍😍
<!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>Custom Cursor Hover Animation</title>
    <link rel="stylesheet" href="style.css">
</head>
<body>
    <a href="#">Hi Hover me!</a>
    <div class="cursor"></div>

    <script>
        let cursor = document.querySelector('.cursor')
            const x_center = cursor.offsetWidth / 2
            const y_center = cursor.offsetHeight / 2

        document.body.addEventListener('mousemove', (e) => {
            cursor.style.left = `${e.x - x_center}px`
            cursor.style.top = `${e.y - y_center}px`
        })

        const links = document.querySelectorAll("a");
            links.forEach((link) => {
                link.addEventListener('mouseenter', (e) => {
                    cursor.classList.remove('unactive')
                    cursor.classList.add('active')
                })

                link.addEventListener('mouseleave', (e) => {
                    cursor.classList.remove('active')
                    cursor.classList.add('unactive')
                })
            })

    </script>
</body>
</html>
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  cursor: none;
}

a {
  width: 300px;
  text-align: center;
  padding: 20px 25px;
  /* background: red; */
  text-decoration: none;
  color: white;
  text-transform: uppercase;
  font-size: 25px;
  font-family: "Courier New", Courier, monospace;
}

body {
  width: 100%;
  height: 100vh;
  background: #000;
  display: grid;
  place-items: center;
}

.cursor {
  display: block;
  position: fixed;
  width: 20px;
  height: 20px;
  background: #f1f2f3;
  border-radius: 50%;
  mix-blend-mode: difference;
  pointer-events: none;
  -webkit-border-radius: 50%;
  -moz-border-radius: 50%;
  -ms-border-radius: 50%;
  -o-border-radius: 50%;
}

.cursor.active {
  animation: activeCursor 200ms ease forwards running;
  -webkit-animation: activeCursor 200ms ease forwards running;
}

@keyframes activeCursor {
  0% {
    transform: scale(1);
    -webkit-transform: scale(1);
    -moz-transform: scale(1);
    -ms-transform: scale(1);
    -o-transform: scale(1);
  }
  100% {
    transform: scale(5);
    -webkit-transform: scale(5);
    -moz-transform: scale(5);
    -ms-transform: scale(5);
    -o-transform: scale(5);
  }
}

Don’t Forget to Follow me on all Social Network

YouTube: https://www.youtube.com/channel/UCw9etYfx-25oKB_qt1fFNWw

Facebook Page: https://www.facebook.com/codingbd2021

LinkedIn: https://www.linkedin.com/in/sajjat-ho… 

GitHub: https://github.com/cgsaleh8383

You can see Animated eid mubarak

Leave a Reply

Your email address will not be published.