Below is a futuristic loading spinner created using only HTML and CSS. It features a sleek, glowing, and rotating design that feels modern and sci-fi. The spinner uses CSS animations and box shadows to create a dynamic, futuristic effect.
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Futuristic Loading Spinner</title>
<style>
body {
margin: 0;
display: flex;
justify-content: center;
align-items: center;
height: 100vh;
background-color: #0a0a0a;
}
.loader {
position: relative;
width: 100px;
height: 100px;
transform-style: preserve-3d;
animation: spin 3s infinite linear;
}
.loader-circle {
position: absolute;
width: 100%;
height: 100%;
border-radius: 50%;
border: 4px solid transparent;
border-top-color: #00f7ff;
border-bottom-color: #ff00ff;
box-shadow: 0 0 20px rgba(0, 247, 255, 0.5), 0 0 20px rgba(255, 0, 255, 0.5);
animation: rotate 2s infinite alternate ease-in-out;
}
.loader-circle:nth-child(2) {
width: 80%;
height: 80%;
top: 10%;
left: 10%;
border-top-color: #ff00ff;
border-bottom-color: #00f7ff;
animation-direction: alternate-reverse;
}
.loader-circle:nth-child(3) {
width: 60%;
height: 60%;
top: 20%;
left: 20%;
border-top-color: #00ff00;
border-bottom-color: #ffff00;
animation-direction: alternate;
}
@keyframes spin {
0% {
transform: rotateX(0) rotateY(0);
}
100% {
transform: rotateX(360deg) rotateY(360deg);
}
}
@keyframes rotate {
0% {
transform: rotate(0);
}
100% {
transform: rotate(180deg);
}
}
</style>
</head>
<body>
<div class="loader">
<div class="loader-circle"></div>
<div class="loader-circle"></div>
<div class="loader-circle"></div>
</div>
</body>
</html>
Explanation:
-
Design:
- The spinner consists of three concentric circles with glowing borders.
- Each circle has a different color combination and rotates independently.
- The entire spinner rotates in 3D space for a futuristic effect.
-
Animations:
spin: Rotates the entire spinner in 3D space (X and Y axes) over 3 seconds.
rotate: Alternates the rotation of each circle between 0 and 180 degrees for a dynamic effect.
-
Colors:
- Neon colors like cyan, magenta, green, and yellow are used to give a futuristic vibe.
- Box shadows enhance the glowing effect.
-
Responsiveness:
- The spinner is centered on the screen and works well on all devices.
This spinner is both visually appealing and lightweight, making it perfect for a futuristic loading screen!