Yoga Classes Hero Section
Preview
Edit
Download
Run
Download Options
HTML File
Download as .html file
CSS File
Download as .css file
JavaScript File
Download as .js file
Combined HTML
All code in one HTML file
Project ZIP
All files in a ZIP archive
Cancel
HTML
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Yoga Classes</title> </head> <body> <section class="hero"> <div class="hero-text"> <h1>Find Your Inner Peace<br>with Yoga</h1> <p>Join our professional Yoga Classes to improve flexibility, balance, and mindfulness. Start your journey towards a healthier body and a calm mind today.</p> <button class="btn">Join Now</button> </div> <div class="hero-img"> <img src="https://plus.unsplash.com/premium_photo-1674675646725-5b4aca5adb21?w=500&auto=format&fit=crop&q=60&ixlib=rb-4.1.0&ixid=M3wxMjA3fDB8MHxzZWFyY2h8MTB8fHlvZ2F8ZW58MHx8MHx8fDA%3D" alt="Yoga Pose"> <div class="circle pink"></div> <div class="circle green"></div> <div class="circle purple"></div> </div> </section> </body> </html>
CSS
* { margin: 0; padding: 0; box-sizing: border-box; font-family: "Poppins", sans-serif; } body { background: #fff; color: #333; } .hero { display: flex; align-items: center; justify-content: space-between; padding: 80px 8%; min-height: 100vh; gap: 40px; background: linear-gradient(135deg, #fef6f9, #f1fff1); position: relative; overflow: hidden; } /* Text */ .hero-text { flex: 1; animation: slideLeft 1.2s ease; } .hero-text h1 { font-size: 3.2rem; font-weight: 700; color: #5a2d82; margin-bottom: 15px; line-height: 1.2; } .hero-text p { font-size: 1.1rem; line-height: 1.6; color: #444; margin-bottom: 25px; } .btn { padding: 14px 34px; border: none; border-radius: 30px; cursor: pointer; background: #8e44ad; color: #fff; font-weight: 600; font-size: 1rem; transition: .3s; } .btn:hover { background: #6d2c91; transform: scale(1.05); } /* Image */ .hero-img { flex: 1; text-align: center; position: relative; animation: slideRight 1.2s ease; } .hero-img img { width: 100%; max-width: 480px; z-index: 2; position: relative; border-radius: 20px; box-shadow: 0 12px 28px rgba(0, 0, 0, 0.15); } /* Decorative Shapes */ .circle { position: absolute; border-radius: 50%; z-index: 1; opacity: 0.25; animation: float 6s infinite ease-in-out; } .circle.pink { width: 280px; height: 280px; top: 10%; right: -5%; background: #f48fb1; } .circle.green { width: 200px; height: 200px; bottom: 15%; right: 8%; background: #81c784; } .circle.purple { width: 150px; height: 150px; top: 60%; left: -10%; background: #9575cd; } /* Responsive */ @media(max-width:992px) { .hero { flex-direction: column-reverse; text-align: center; } .hero-text h1 { font-size: 2.2rem; } .hero-img img { max-width: 350px; } } /* Animations */ @keyframes slideLeft { from { opacity: 0; transform: translateX(-50px); } to { opacity: 1; transform: translateX(0); } } @keyframes slideRight { from { opacity: 0; transform: translateX(50px); } to { opacity: 1; transform: translateX(0); } } @keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-20px); } }
JavaScript
Output Preview
Desktop
Mobile
Fullscreen