پیشنمایش زنده
کد HTML
<div class="loader-container">
<div class="jellyfish">
<div class="jellyfish-head"></div>
<div class="tentacles">
<div class="tentacle"></div>
<div class="tentacle"></div>
<div class="tentacle"></div>
<div class="tentacle"></div>
<div class="tentacle"></div>
</div>
</div>
<div class="bubbles">
<div class="bubble"></div>
<div class="bubble"></div>
<div class="bubble"></div>
<div class="bubble"></div>
<div class="bubble"></div>
<div class="bubble"></div>
</div>
</div>
کد CSS
.loader-container {
position: relative;
width: 300px;
height: 400px;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
}
.jellyfish {
position: relative;
width: 120px;
height: 120px;
margin-bottom: 60px;
animation: float 3s ease-in-out infinite;
}
.jellyfish-head {
width: 120px;
height: 80px;
background: radial-gradient(
ellipse at center top,
rgba(255, 255, 255, 0.9) 0%,
rgba(173, 216, 230, 0.8) 30%,
rgba(135, 206, 250, 0.7) 60%,
rgba(70, 130, 180, 0.6) 100%
);
border-radius: 50% 50% 50% 50% / 100% 100% 40% 40%;
position: relative;
box-shadow:
0 0 20px rgba(173, 216, 230, 0.6),
inset 0 -10px 20px rgba(255, 255, 255, 0.3);
animation: pulse 2s ease-in-out infinite;
}
.jellyfish-head::before {
content: "";
position: absolute;
top: 15px;
left: 20px;
width: 80px;
height: 40px;
background: radial-gradient(
ellipse,
rgba(255, 255, 255, 0.6) 0%,
rgba(255, 255, 255, 0.2) 70%,
transparent 100%
);
border-radius: 50%;
animation: shimmer 2.5s ease-in-out infinite;
}
.tentacles {
position: absolute;
bottom: -160px;
left: 50%;
transform: translateX(-50%);
width: 100%;
height: 200px;
}
.tentacle {
position: absolute;
width: 4px;
height: 100px;
background: linear-gradient(
to bottom,
rgba(173, 216, 230, 0.8) 0%,
rgba(135, 206, 250, 0.6) 50%,
rgba(70, 130, 180, 0.4) 100%
);
border-radius: 2px;
transform-origin: top center;
}
.tentacle:nth-child(1) {
left: 20%;
animation: sway1 3s ease-in-out infinite;
height: 120px;
}
.tentacle:nth-child(2) {
left: 35%;
animation: sway2 2.5s ease-in-out infinite;
height: 140px;
}
.tentacle:nth-child(3) {
left: 50%;
animation: sway3 3.2s ease-in-out infinite;
height: 130px;
}
.tentacle:nth-child(4) {
left: 65%;
animation: sway4 2.8s ease-in-out infinite;
height: 135px;
}
.tentacle:nth-child(5) {
left: 80%;
animation: sway5 3.5s ease-in-out infinite;
height: 115px;
}
.loading-text {
background: linear-gradient(
45deg,
#1e3c72 0%,
#2a5298 20%,
#4a90e2 40%,
#5cb3e6 60%,
#7dd3fc 80%,
#a3d9f0 100%
);
background-size: 300% 300%;
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
background-clip: text;
font-size: 18px;
font-weight: 300;
letter-spacing: 2px;
text-transform: uppercase;
margin-top: 20px;
animation: wave-colors 3s ease-in-out infinite;
}
.dots {
display: inline-block;
width: 40px;
text-align: left;
}
.dots::after {
content: "";
animation: dots 2s steps(4, end) infinite;
}
.bubbles {
position: absolute;
width: 100%;
height: 100%;
pointer-events: none;
}
.bubble {
position: absolute;
border-radius: 50%;
background: radial-gradient(
circle at 30% 30%,
rgba(255, 255, 255, 0.8),
rgba(173, 216, 230, 0.4)
);
animation: bubble-rise 4s linear infinite;
opacity: 0;
}
.bubble:nth-child(1) {
width: 8px;
height: 8px;
left: 20%;
animation-delay: 0s;
}
.bubble:nth-child(2) {
width: 12px;
height: 12px;
left: 70%;
animation-delay: 1s;
}
.bubble:nth-child(3) {
width: 6px;
height: 6px;
left: 40%;
animation-delay: 2s;
}
.bubble:nth-child(4) {
width: 10px;
height: 10px;
left: 60%;
animation-delay: 0.5s;
}
.bubble:nth-child(5) {
width: 5px;
height: 5px;
left: 80%;
animation-delay: 1.5s;
}
.bubble:nth-child(6) {
width: 9px;
height: 9px;
left: 25%;
animation-delay: 2.5s;
}
@keyframes wave-colors {
0%,
100% {
background-position: 0% 50%;
}
50% {
background-position: 100% 50%;
}
}
@keyframes float {
0%,
100% {
transform: translateY(0px);
}
50% {
transform: translateY(-15px);
}
}
@keyframes pulse {
0%,
100% {
transform: scale(1);
box-shadow: 0 0 20px rgba(173, 216, 230, 0.6);
}
50% {
transform: scale(1.05);
box-shadow: 0 0 30px rgba(173, 216, 230, 0.8);
}
}
@keyframes shimmer {
0%,
100% {
opacity: 0.6;
}
50% {
opacity: 1;
}
}
@keyframes sway1 {
0%,
100% {
transform: rotate(-8deg);
}
50% {
transform: rotate(12deg);
}
}
@keyframes sway2 {
0%,
100% {
transform: rotate(10deg);
}
50% {
transform: rotate(-15deg);
}
}
@keyframes sway3 {
0%,
100% {
transform: rotate(-5deg);
}
50% {
transform: rotate(8deg);
}
}
@keyframes sway4 {
0%,
100% {
transform: rotate(12deg);
}
50% {
transform: rotate(-10deg);
}
}
@keyframes sway5 {
0%,
100% {
transform: rotate(-10deg);
}
50% {
transform: rotate(15deg);
}
}
@keyframes dots {
0% {
content: "";
}
25% {
content: ".";
}
50% {
content: "..";
}
75% {
content: "...";
}
100% {
content: "";
}
}
@keyframes bubble-rise {
0% {
bottom: -20px;
opacity: 0;
transform: translateX(0px) scale(0.5);
}
10% {
opacity: 1;
}
90% {
opacity: 1;
}
100% {
bottom: 120%;
opacity: 0;
transform: translateX(20px) scale(1.2);
}
}
/* Responsive design */
@media (max-width: 480px) {
.loader-container {
width: 250px;
height: 350px;
}
.jellyfish {
width: 100px;
height: 100px;
}
.jellyfish-head {
width: 100px;
height: 65px;
}
.loading-text {
font-size: 16px;
}
}