Stylish Floating Cloud Div - MeggiTools
Run
Toggle Theme
Share Link
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Stylish Floating Cloud Div</title> <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0-beta3/css/all.min.css"> <style> body { background: #87ceeb; display: flex; justify-content: center; align-items: center; height: 100vh; margin: 0; font-family: Arial, sans-serif; } .floating-cloud-div { position: relative; background: #fff; border-radius: 20px; padding: 20px; width: 300px; height: 200px; box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2); overflow: hidden; color: #333; text-align: center; animation: float 3s ease-in-out infinite; } @keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } } .floating-cloud-div h1 { font-size: 1.5em; margin: 0; } .floating-cloud-div p { font-size: 1em; margin-top: 10px; } .icon { font-size: 2em; margin-top: 20px; } </style> </head> <body> <div class="floating-cloud-div"> <h1>Floating Cloud Div</h1> <p>Light and airy.</p> <div class="icon"> <i class="fas fa-cloud"></i> ☁️ </div> </div> </body> </html>