Styled Fieldset Legend - 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>Styled Fieldset Legend</title> <style> body { font-family: 'Arial', sans-serif; background-color: #f0f2f5; display: flex; justify-content: center; align-items: center; height: 100vh; margin: 0; } .fieldset-container { width: 60%; max-width: 800px; } fieldset { border: 2px solid #3498db; border-radius: 10px; padding: 20px; position: relative; background-color: white; box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1); transition: transform 0.3s ease, box-shadow 0.3s ease; } fieldset:hover { transform: translateY(-10px); box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2); } legend { font-size: 1.5rem; font-weight: bold; color: #3498db; position: relative; padding: 0 10px; border: 2px solid #3498db; /* background: #fff; */ border-radius: 5px; display: inline-block; animation: pulse 2s infinite; display: flex; align-items: center; } /* @keyframes pulse { 0% { transform: scale(1); opacity: 1; } 50% { transform: scale(1.1); opacity: 0.8; } 100% { transform: scale(1); opacity: 1; } } */ legend::before { /* content: "🚀"; */ margin-right: 10px; font-size: 1.2rem; animation: bounce 1.5s infinite; } @keyframes bounce { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } } legend::after { content: "✨"; margin-left: 10px; font-size: 1.2rem; animation: spin 3s linear infinite; } @keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } } .fieldset-content { margin-top: 20px; } .icon { width: 30px; height: 30px; margin-right: 10px; } .info-item { display: flex; align-items: center; margin-bottom: 10px; } </style> </head> <body> <div class="fieldset-container"> <fieldset> <legend><span class="icon">💡</span>Innovative Design</legend> <div class="fieldset-content"> <div class="info-item"> <img src="https://img.icons8.com/color/48/000000/html-5--v1.png" class="icon" alt="HTML Icon"> <span>HTML5 Markup</span> </div> <div class="info-item"> <img src="https://img.icons8.com/color/48/000000/css3.png" class="icon" alt="CSS Icon"> <span>CSS3 Styling</span> </div> <div class="info-item"> <img src="https://img.icons8.com/color/48/000000/javascript.png" class="icon" alt="JavaScript Icon"> <span>JavaScript Functionality</span> </div> </div> </fieldset> </div> </body> </html>