Highly Styled Div - 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>Highly Styled Div</title> <style> body { background-color: #f0f2f5; font-family: 'Arial', sans-serif; display: flex; justify-content: center; align-items: center; height: 100vh; margin: 0; } .fancy-div { background: linear-gradient(135deg, #ffcc33, #ff33cc); color: white; border-radius: 15px; box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2); padding: 30px; max-width: 500px; text-align: center; position: relative; overflow: hidden; cursor: pointer; transition: transform 0.3s ease, box-shadow 0.3s ease; } .fancy-div:hover { transform: scale(1.05); box-shadow: 0 20px 30px rgba(0, 0, 0, 0.3); } .fancy-div::before { content: '✨'; font-size: 50px; position: absolute; top: -20px; left: -20px; animation: spin 5s linear infinite; } .fancy-div::after { content: '💫'; font-size: 50px; position: absolute; bottom: -20px; right: -20px; animation: spin 5s linear infinite reverse; } @keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } } .icon { font-size: 40px; margin: 10px; animation: bounce 2s infinite; } @keyframes bounce { 0%, 20%, 50%, 80%, 100% { transform: translateY(0); } 40% { transform: translateY(-30px); } 60% { transform: translateY(-15px); } } .title { font-size: 24px; margin-bottom: 10px; font-weight: bold; } .description { font-size: 18px; margin-bottom: 20px; } .button { background-color: #ffffff; color: #ff33cc; border: none; padding: 10px 20px; border-radius: 50px; font-size: 16px; font-weight: bold; cursor: pointer; transition: background-color 0.3s ease, color 0.3s ease; } .button:hover { background-color: #ff33cc; color: #ffffff; } </style> </head> <body> <div class="fancy-div" onclick="handleClick()"> <div class="icon">🌟</div> <div class="title">Welcome to My Awesome Div!</div> <div class="description">This is a professional, highly attractive div that you can use in your projects.</div> <button class="button">Click Me</button> </div> <script> function handleClick() { alert('You clicked the fancy div!'); } </script> </body> </html>