Modern Label - 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"> <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css" /> <title>Modern Label</title> <style> @import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;600&display=swap'); body { font-family: 'Poppins', sans-serif; display: flex; justify-content: center; align-items: center; height: 100vh; background-color: #f0f4f8; margin: 0; } .label-container { display: inline-flex; align-items: center; background: linear-gradient(45deg, #43cea2, #185a9d); color: #fff; border-radius: 30px; padding: 10px 20px; box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1); position: relative; overflow: hidden; cursor: pointer; transition: transform 0.3s ease; } .label-container:hover { transform: scale(1.05); } .label-icon { display: flex; align-items: center; justify-content: center; background-color: #fff; color: #43cea2; border-radius: 50%; width: 40px; height: 40px; margin-right: 10px; font-size: 1.5rem; transition: background-color 0.3s ease, color 0.3s ease; } .label-container:hover .label-icon { background-color: #185a9d; color: #fff; } .label-text { font-size: 1.2rem; font-weight: 600; position: relative; z-index: 1; } .label-emoji { margin-left: 10px; font-size: 1.5rem; } /* Animation */ .label-container::before { content: ''; position: absolute; top: 50%; left: 50%; width: 300%; height: 300%; background: radial-gradient(circle, rgba(255, 255, 255, 0.1), transparent); transform: translate(-50%, -50%) scale(0); transition: transform 0.5s ease; } .label-container:hover::before { transform: translate(-50%, -50%) scale(1); } .tooltip { visibility: hidden; background-color: #43cea2; color: #fff; text-align: center; border-radius: 5px; padding: 5px; position: absolute; z-index: 1; bottom: 125%; left: 50%; margin-left: -60px; opacity: 0; transition: opacity 0.3s; } .label-container:hover .tooltip { visibility: visible; opacity: 1; } .tooltip::after { content: ""; position: absolute; top: 100%; left: 50%; margin-left: -5px; border-width: 5px; border-style: solid; border-color: #43cea2 transparent transparent transparent; } </style> </head> <body> <div class="label-container"> <div class="label-icon"> <i class="fa fa-bolt"></i> </div> <div class="label-text">Modern Label</div> <div class="label-emoji"></div> <span class="tooltip">Click for more info!</span> </div> <script src="https://kit.fontawesome.com/a076d05399.js" crossorigin="anonymous"></script> <script> document.querySelector('.label-container').addEventListener('click', function() { alert('Label clicked! Here you can provide more info or actions.'); }); </script> </body> </html>