Created
July 19, 2023 23:48
-
-
Save simonw/c3ab94911f42bbd0822ca4e61eb8424e to your computer and use it in GitHub Desktop.
Rotating emoji globe
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>Globe Emoji Animation</title> | |
<style>h1 { font-size: 70vh; text-align: center; padding: 0; margin: 0 }</style> | |
</head> | |
<body> | |
<h1>π</h1> | |
<script> | |
const globeEmojis = ['π', 'π', 'π']; | |
const h1 = document.querySelector('h1'); | |
let i = 0; | |
setInterval(() => { | |
h1.innerHTML = globeEmojis[i++ % globeEmojis.length]; | |
}, 500); | |
</script> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Neato. Here's same thing in a React component.