.cloud-group { height: 80px; display: flex; justify-content: center; align-items: center; } .cloud1 { font-size: 45px; animation: floatCloud 3s ease-in-out infinite; } .weather-box{ width: 80px; height: 80px; } @keyframes floatCloud { 0%, 100% { transform: translateX(0); } 50% { transform: translateX(10px); } }