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
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;700&display=swap'); | |
body, html { | |
margin: 0; | |
padding: 0; | |
width: 100%; | |
height: 100%; | |
font-family: 'Poppins', sans-serif; | |
overflow: hidden; /* Prevents scrollbars from appearing during animations */ | |
background-color: #1a1a2e; /* Dark fallback */ |
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
// Makes a H1 element have a "hacked" effect on hover. | |
const letters = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"; | |
let interval = null; | |
document.querySelector("h1").onmouseover = event => { | |
let iteration = 0; | |
const targetValue = event.target.dataset.value; | |
clearInterval(interval); |