#explode-x-container { display: flex; justify-content: center; align-items: center; height: 100vh; } #explode-x { width: 100px; height: 100px; background-color: #000; cursor: pointer; position: relative; } #explode-x:before, #explode-x:after { content: ""; width: 100%; height: 2px; background-color: #000; position: absolute; top: calc(50% - 1px); left: 0; } #explode-x:before { transform: rotate(45deg); } #explode-x:after { transform: rotate(-45deg); }
top of page
poster.png

We are quite social 

Quick Links

bottom of page
const explodeX = document.getElementById("explode-x"); function handleClick() { explodeX.classList.add("explode"); setTimeout(() => { explodeX.classList.remove("explode"); }, 1000); } explodeX.addEventListener("click", handleClick);