AkshayPratapSingh09 / Hacktoberfest2023-Open

Accepting all PR's for Hacktoberfest 2023 just raise an issue and a PR , your PR will get accepted!
GNU General Public License v3.0
11 stars 101 forks source link

Make Your First Open Source Move #3

Open AkshayPratapSingh09 opened 11 months ago

AkshayPratapSingh09 commented 11 months ago

Issue : Make first Open Source Contribution

260703 commented 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.

  1. Create an HTML file (e.g., index.html):

<!DOCTYPE html>

Cursor Emoji
😊
  1. Create a CSS file (e.g., styles.css) to style the emoji and container:

body { margin: 0; overflow: hidden; cursor: none; }

.container { position: relative; width: 100vw; height: 100vh; }

.emoji { position: absolute; font-size: 36px; }

  1. Create a JavaScript file (e.g., script.js) to make the emoji follow the cursor:

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.

shubhalgupta commented 10 months ago

@AkshayPratapSingh09 is this issue still open? If yes, what exactly do I need to do?