<div class="header">
<h1>☁️ Animated Clouds</h1>
<p>Pure CSS cloud animations with beautiful sky effects</p>
</div>
<div class="sky">
<!-- Sun -->
<div class="sun"></div>
<!-- White Clouds -->
<div class="cloud cloud-1"></div>
<div class="cloud cloud-2"></div>
<div class="cloud cloud-3"></div>
<div class="cloud cloud-4"></div>
<div class="cloud cloud-5"></div>
<div class="cloud cloud-6"></div>
<div class="cloud cloud-7"></div>
<div class="cloud cloud-8"></div>
<!-- Colored Background Clouds -->
<div class="colored-cloud colored-cloud-1"></div>
<div class="colored-cloud colored-cloud-2"></div>
<div class="colored-cloud colored-cloud-3"></div>
<!-- Flying Birds -->
<div class="bird bird-1"></div>
<div class="bird bird-2"></div>
<div class="bird bird-3"></div>
</div>
<div class="info-section">
<div class="info-card">
<div class="info-icon">☁️</div>
<div class="info-title">Realistic Clouds</div>
<div class="info-desc">
Multiple layers of animated clouds floating across the sky with varying speeds and sizes for realistic motion.
</div>
</div>
<div class="info-card">
<div class="info-icon">🎨</div>
<div class="info-title">Pure CSS</div>
<div class="info-desc">
Created entirely with CSS animations - no JavaScript required. Smooth, performant, and lightweight animations.
</div>
</div>
<div class="info-card">
<div class="info-icon">✨</div>
<div class="info-title">Beautiful Effects</div>
<div class="info-desc">
Includes glowing sun, flying birds, colored atmospheric clouds, and a dynamic gradient sky background.
</div>
</div>
</div>
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
body {
font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
background: linear-gradient(to bottom, #90e0ef 0%, #caf0f8 50%, #ade8f4 100%);
min-height: 100vh;
overflow-x: hidden;
position: relative;
}
.header {
text-align: center;
color: white;
padding: 40px 20px;
position: relative;
z-index: 10;
text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
}
.header h1 {
font-size: 3rem;
font-weight: 700;
margin-bottom: 10px;
animation: fadeInDown 1s ease;
}
.header p {
font-size: 1.2rem;
opacity: 0.95;
animation: fadeInDown 1s ease 0.2s backwards;
}
@keyframes fadeInDown {
from {
opacity: 0;
transform: translateY(-30px);
}
to {
opacity: 1;
transform: translateY(0);
}
}
.sky {
position: relative;
width: 100%;
height: 80vh;
overflow: hidden;
}
/* Cloud Styles */
.cloud {
position: absolute;
background: rgba(255, 255, 255, 0.8);
border-radius: 100px;
box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}
.cloud::before,
.cloud::after {
content: '';
position: absolute;
background: rgba(255, 255, 255, 0.8);
border-radius: 100px;
}
/* Cloud 1 - Large Fluffy */
.cloud-1 {
width: 200px;
height: 60px;
top: 10%;
animation: float 20s linear infinite;
}
.cloud-1::before {
width: 100px;
height: 80px;
top: -40px;
left: 20px;
}
.cloud-1::after {
width: 120px;
height: 70px;
top: -30px;
right: 20px;
}
/* Cloud 2 - Medium */
.cloud-2 {
width: 150px;
height: 50px;
top: 25%;
animation: float 25s linear infinite;
animation-delay: -5s;
}
.cloud-2::before {
width: 80px;
height: 60px;
top: -30px;
left: 15px;
}
.cloud-2::after {
width: 90px;
height: 55px;
top: -25px;
right: 15px;
}
/* Cloud 3 - Small */
.cloud-3 {
width: 100px;
height: 40px;
top: 40%;
animation: float 15s linear infinite;
animation-delay: -10s;
}
.cloud-3::before {
width: 60px;
height: 50px;
top: -25px;
left: 10px;
}
.cloud-3::after {
width: 70px;
height: 45px;
top: -20px;
right: 10px;
}
/* Cloud 4 - Extra Large */
.cloud-4 {
width: 250px;
height: 70px;
top: 55%;
animation: float 30s linear infinite;
animation-delay: -15s;
}
.cloud-4::before {
width: 120px;
height: 90px;
top: -45px;
left: 30px;
}
.cloud-4::after {
width: 140px;
height: 80px;
top: -35px;
right: 30px;
}
/* Cloud 5 - Tiny */
.cloud-5 {
width: 80px;
height: 35px;
top: 70%;
animation: float 12s linear infinite;
animation-delay: -3s;
}
.cloud-5::before {
width: 50px;
height: 45px;
top: -22px;
left: 8px;
}
.cloud-5::after {
width: 55px;
height: 40px;
top: -18px;
right: 8px;
}
/* Cloud 6 - Wide */
.cloud-6 {
width: 180px;
height: 55px;
top: 15%;
animation: float 22s linear infinite;
animation-delay: -18s;
}
.cloud-6::before {
width: 90px;
height: 70px;
top: -35px;
left: 18px;
}
.cloud-6::after {
width: 100px;
height: 65px;
top: -30px;
right: 18px;
}
/* Cloud 7 - Puffy */
.cloud-7 {
width: 140px;
height: 45px;
top: 35%;
animation: float 18s linear infinite;
animation-delay: -8s;
}
.cloud-7::before {
width: 75px;
height: 65px;
top: -32px;
left: 12px;
}
.cloud-7::after {
width: 85px;
height: 60px;
top: -28px;
right: 12px;
}
/* Cloud 8 - Compact */
.cloud-8 {
width: 120px;
height: 42px;
top: 60%;
animation: float 16s linear infinite;
animation-delay: -12s;
}
.cloud-8::before {
width: 65px;
height: 55px;
top: -28px;
left: 10px;
}
.cloud-8::after {
width: 75px;
height: 50px;
top: -24px;
right: 10px;
}
@keyframes float {
0% {
left: -300px;
opacity: 0;
}
10% {
opacity: 1;
}
90% {
opacity: 1;
}
100% {
left: calc(100% + 300px);
opacity: 0;
}
}
/* Animated Colored Clouds */
.colored-cloud {
position: absolute;
filter: blur(40px);
opacity: 0.4;
border-radius: 50%;
animation: colorFloat 25s ease-in-out infinite;
}
.colored-cloud-1 {
width: 300px;
height: 300px;
background: #90e0ef;
top: 10%;
left: 10%;
animation-delay: 0s;
}
.colored-cloud-2 {
width: 400px;
height: 400px;
background: #caf0f8;
top: 40%;
right: 10%;
animation-delay: -8s;
}
.colored-cloud-3 {
width: 250px;
height: 250px;
background: #90e0ef;
bottom: 20%;
left: 30%;
animation-delay: -15s;
}
@keyframes colorFloat {
0%, 100% {
transform: translate(0, 0) scale(1);
}
33% {
transform: translate(50px, -30px) scale(1.1);
}
66% {
transform: translate(-30px, 50px) scale(0.9);
}
}
/* Info Cards */
.info-section {
position: relative;
z-index: 10;
max-width: 1200px;
margin: 0 auto;
padding: 40px 20px;
display: grid;
grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
gap: 30px;
}
.info-card {
background: rgba(255, 255, 255, 0.9);
backdrop-filter: blur(10px);
border-radius: 20px;
padding: 30px;
box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
text-align: center;
transition: transform 0.3s ease;
animation: fadeInUp 1s ease backwards;
}
.info-card:nth-child(1) { animation-delay: 0.2s; }
.info-card:nth-child(2) { animation-delay: 0.4s; }
.info-card:nth-child(3) { animation-delay: 0.6s; }
@keyframes fadeInUp {
from {
opacity: 0;
transform: translateY(50px);
}
to {
opacity: 1;
transform: translateY(0);
}
}
.info-card:hover {
transform: translateY(-10px);
}
.info-icon {
font-size: 3rem;
margin-bottom: 15px;
}
.info-title {
font-size: 1.5rem;
color: #0077b6;
font-weight: 700;
margin-bottom: 10px;
}
.info-desc {
color: #555;
line-height: 1.6;
font-size: 1rem;
}
/* Sun */
.sun {
position: absolute;
top: 80px;
right: 100px;
width: 120px;
height: 120px;
background: #ffd60a;
border-radius: 50%;
box-shadow: 0 0 40px rgba(255, 214, 10, 0.6),
0 0 80px rgba(255, 214, 10, 0.4);
animation: sunPulse 4s ease-in-out infinite;
z-index: 1;
}
@keyframes sunPulse {
0%, 100% {
transform: scale(1);
box-shadow: 0 0 40px rgba(255, 214, 10, 0.6),
0 0 80px rgba(255, 214, 10, 0.4);
}
50% {
transform: scale(1.05);
box-shadow: 0 0 60px rgba(255, 214, 10, 0.8),
0 0 100px rgba(255, 214, 10, 0.5);
}
}
/* Birds */
.bird {
position: absolute;
width: 40px;
height: 20px;
animation: flyBird 15s linear infinite;
z-index: 5;
}
.bird::before,
.bird::after {
content: '';
position: absolute;
width: 20px;
height: 8px;
background: #023e8a;
border-radius: 50%;
animation: flapWings 0.5s ease-in-out infinite;
}
.bird::before {
left: 0;
transform-origin: right center;
}
.bird::after {
right: 0;
transform-origin: left center;
animation-delay: 0.25s;
}
.bird-1 {
top: 15%;
animation-delay: 0s;
}
.bird-2 {
top: 30%;
animation-delay: -5s;
}
.bird-3 {
top: 45%;
animation-delay: -10s;
}
@keyframes flyBird {
0% {
left: -50px;
}
100% {
left: calc(100% + 50px);
}
}
@keyframes flapWings {
0%, 100% {
transform: rotateY(0deg);
}
50% {
transform: rotateY(60deg);
}
}
@media (max-width: 768px) {
.header h1 {
font-size: 2rem;
}
.header p {
font-size: 1rem;
}
.sun {
width: 80px;
height: 80px;
right: 40px;
top: 60px;
}
.sky {
height: 60vh;
}
.info-section {
grid-template-columns: 1fr;
}
}
No comments yet. Be the first!