Ask coding questions

← Back to all posts
Why are the stars getting caught in the left of the page?
AmhedeWeeeeeuss (2)

TBH I haven't tried anything BC IDK WHATS WRONG. can someone please diagnose my lint-catching repl? and I'm sorry, but I'm asking how. or just for the diagnostics.
repl below

Answered by SixBeeps (5052) [earned 5 cycles]
View Answer
SixBeeps (5052)

Add this CSS rule to the Star class:

animation-fill-mode: forwards;
SixBeeps (5052)

If you want to know why this works, it's because the stars go back to their original position once they're done animating. This makes sure that they stay at their final position instead.

AmhedeWeeeeeuss (2)

@SixBeeps i knew it does that, but i t.... nvm. but one more question... is there an event that is fired when the tab goes in and out of view? i tried to use focus and blur on document but that didn't work. also i found out that only works for the window.