Spinning Heart Icon - 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>Spinning Heart Icon</title> <style> @import url('https://fonts.googleapis.com/css2?family=Material+Icons'); body { display: flex; justify-content: center; align-items: center; height: 100vh; background: linear-gradient(135deg, #ff9a9e 0%, #fad0c4 99%, #fad0c4 100%); font-family: 'Arial', sans-serif; margin: 0; } .icon-wrapper { position: relative; display: inline-block; width: 120px; height: 120px; background: #ffffff; border-radius: 50%; box-shadow: 0 20px 30px rgba(0, 0, 0, 0.2); overflow: hidden; cursor: pointer; transition: transform 0.3s ease, box-shadow 0.3s ease; } .icon-wrapper:hover { transform: scale(1.2); box-shadow: 0 25px 35px rgba(0, 0, 0, 0.3); } .icon-wrapper::before { content: '💫'; position: absolute; top: -20px; left: -20px; width: 40px; height: 40px; font-size: 40px; animation: spin 4s linear infinite; } .icon-wrapper::after { content: '✨'; position: absolute; bottom: -20px; right: -20px; width: 40px; height: 40px; font-size: 40px; animation: spin 6s linear infinite reverse; } .icon { font-size: 60px; line-height: 120px; color: #ff4081; text-align: center; display: block; transition: color 0.3s ease; } .icon-wrapper:hover .icon { color: #d81b60; } .tooltip { position: absolute; bottom: 130%; left: 50%; transform: translateX(-50%); padding: 8px 12px; background: rgba(0, 0, 0, 0.7); color: #fff; border-radius: 6px; font-size: 14px; opacity: 0; visibility: hidden; transition: opacity 0.3s ease, visibility 0.3s ease; } .icon-wrapper:hover .tooltip { opacity: 1; visibility: visible; } .burst { position: absolute; top: 50%; left: 50%; width: 300%; height: 300%; background: radial-gradient(circle, rgba(255,255,255,0) 40%, rgba(255,255,255,0.5) 70%, rgba(255,255,255,0) 90%); transform: translate(-50%, -50%) scale(0); border-radius: 50%; animation: burst-animation 1s ease forwards; } .icon-wrapper:hover .burst { animation: burst-animation 1s ease forwards; } @keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } } @keyframes burst-animation { 0% { transform: translate(-50%, -50%) scale(0); opacity: 0; } 50% { transform: translate(-50%, -50%) scale(1.5); opacity: 1; } 100% { transform: translate(-50%, -50%) scale(0); opacity: 0; } } </style> </head> <body> <div class="icon-wrapper"> <span class="icon material-icons">favorite</span> <div class="tooltip">Click Me!</div> <div class="burst"></div> </div> </body> </html>