Untitled
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Bouquet Opening</title> <style> body { display: flex; justify-content: center; align-items: center; height: 100vh; margin: 0; background-color: #f0f0f0; } .bouquet { position: relative; width: 300px; height: 300px; border-radius: 50%; } .rose { position: absolute; width: 50px; height: 50px; border-radius: 50%; background-color: red; opacity: 0; transform: scale(0); animation: openBouquet 4s ease-out forwards; } .rose:nth-child(1) { top: 20px; left: 125px; animation-delay: 0s; } .rose:nth-child(2) { top: 70px; left: 40px; animation-delay: 0.5s; } .rose:nth-child(3) { top: 70px; left: 210px; animation-delay: 1s; } .rose:nth-child(4) { top: 120px; left: 70px; animation-delay: 1.5s; } .rose:nth-child(5) { top: 120px; left: 160px; animation-delay: 2s; } .rose:nth-child(6) { top: 170px; left: 100px; animation-delay: 2.5s; } .rose:nth-child(7) { top: 170px; left: 130px; animation-delay: 3s; } @keyframes openBouquet { 0% { opacity: 0; transform: scale(0); } 100% { opacity: 1; transform: scale(1); } } </style> </head> <body> <div class="bouquet"> <div class="rose"></div> <div class="rose"></div> <div class="rose"></div> <div class="rose"></div> <div class="rose"></div> <div class="rose"></div> <div class="rose"></div> </div> </body> </html>
Leave a Comment