Menu

Three ways to destroy a web page and put it back exactly
📰

Three ways to destroy a web page and put it back exactly

DEV Community: javascript·Frantisek Gejdos·about 15 hours ago
#Ai20ylRF
#devtojavascript#devto#dev#hole#black
Long article (462 words) — no AI summary yet.
Reading 0:00
15s threshold

A 404 page is the one place where you're allowed to be silly. I made three small packages that let visitors wreck the page they are on: a black hole that swallows it, a spaceship that shoots it to bits, and a snap that turns half of it to dust. Each one has a "Put it back" button, and that button was the hard part.

Try them: https://fluri.xyz/black-hole/ · https://fluri.xyz/page-asteroids/ · https://fluri.xyz/page-snap/

<script src = "https://cdn.jsdelivr.net/npm/@fluritheme/black-hole@1/dist/black-hole.global.js" data-auto ></script>

Enter fullscreen mode

Exit fullscreen mode

All three are free, MIT and have zero dependencies. They start from a small button, the Konami code, a timer or your own code.

Rule one: never touch the layout

If you remove or move real elements, the page reflows, things jump, and you can't promise to restore it. So the page is only ever changed with transform , opacity , clip-path and visibility , which don't affect layout.…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.