* { margin: 0; padding: 0; box-sizing: border-box; } html, body { height: 100%; overflow: hidden; } .background { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background-size: cover; background-position: center; background-repeat: no-repeat; transition: opacity 0.5s ease-in-out; z-index: -1; } .background.hidden { opacity: 0; } .background.visible { opacity: 1; } .sakura { position: absolute; top: -50px; color: pink; font-size: 12px; animation: fall linear forwards; pointer-events: none; user-select: none; } @keyframes fall { to { transform: translateY(110vh) rotate(360deg); opacity: 0; } }