Open AkshayPratapSingh09 opened 11 months ago
This code creates a simple webpage with a happy face emoji that follows the cursor. The emoji's position is updated whenever the mouse is moved.
<!DOCTYPE html>
body { margin: 0; overflow: hidden; cursor: none; }
.container { position: relative; width: 100vw; height: 100vh; }
.emoji { position: absolute; font-size: 36px; }
const emoji = document.getElementById('emoji');
document.onmousemove = (e) => { const x = e.pageX; const y = e.pageY;
emoji.style.left = x + 'px';
emoji.style.top = y + 'px';
};
----------------------------------------------------the-code-ends-here-----------------------------------------------------------
Make sure to place the HTML, CSS, and JavaScript files in the same directory and open the index.html file in your web browser. The emoji should follow your cursor as you move it around the page. You can customize the styling and emoji to suit your preferences.
@AkshayPratapSingh09 is this issue still open? If yes, what exactly do I need to do?
Issue : Make first Open Source Contribution