-
Atom loader Animation
HTML
CSS
JavaScript
* { margin: 0; padding: 0; box-sizing: border-box; font-family: Arial, sans-serif; } body { height: 100vh; background: radial-gradient(circle at center, #020617, #000000); display: flex; justify-content: center; align-items: center; color: #00ffff; } /* Container */ .container { text-align: center; } /* Atom */ .atom { position: relative; width: 200px; height: 200px; perspective: 1000px; margin: auto; } /* Nucleus */ .nucleus { position: absolute; width: 14px; height: 14px; background: #00ffff; border-radius: 50%; top: 50%; left: 50%; transform: translate(-50%, -50%); box-shadow: 0 0 15px #00ffff, 0 0 35px #00ffff; } /* Orbit base */ .orbit { position: absolute; width: 100%; height: 100%; border: 3px solid rgba(0,255,255,0.3); border-radius: 50%; } /* Spin layer */ .spin { width: 100%; height: 100%; position: relative; animation: spin 2.5s linear infinite; } /* Electron */ .spin::after { content: ""; position: absolute; top: -6px; left: 50%; width: 10px; height: 10px; background: #00ffff; border-radius: 50%; transform: translateX(-50%); box-shadow: 0 0 10px #00ffff, 0 0 20px #00ffff; } /* Orbit angles */ .orbit1 { transform: rotateX(65deg); } .orbit2 { transform: rotateY(65deg); } .orbit3 { transform: rotateZ(0deg); } /* Animation */ @keyframes spin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }
Live Preview