Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fly #6

Open
Youssef56oz opened this issue Dec 23, 2023 · 1 comment
Open

Fly #6

Youssef56oz opened this issue Dec 23, 2023 · 1 comment

Comments

@Youssef56oz
Copy link

<title>Fly Animation</title> <style> #fly { width: 50px; height: 50px; background-color: #3498db; position: absolute; } </style>
<script> // Get the fly element const fly = document.getElementById('fly'); // Set initial position of the fly let positionX = 0; let positionY = 0; // Function to move the fly function moveFly() { // Update position positionX += 5; positionY += 3; // Set new position fly.style.left = positionX + 'px'; fly.style.top = positionY + 'px'; // Repeat the animation requestAnimationFrame(moveFly); } // Start the animation moveFly(); </script>
@yourgf-skull
Copy link

[fly.io]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants