Flat buttons are a staple in modern web design, offering a sleek and minimalist aesthetic. They provide a clean, unobtrusive way to guide users through an interface.
In this article, we'll explore 10 flat button examples that showcase the versatility and elegance of this design trend.
CODE1
Here's the code:
CODETEXT1
CODE2
Here's the code:
CODETEXT2
CODE3
Here's the code:
CODETEXT3
CODE4
Here's the code:
CODETEXT4
CODE5
Here's the code:
CODETEXT5
Subframe's drag-and-drop interface and intuitive, responsive canvas make it effortless to design pixel-perfect flat buttons. Loved by designers and developers alike, Subframe ensures your UI is both stunning and functional.
Start for free and elevate your design game today!
CODE6
Here's the code:
CODETEXT6
CODE7
Here's the code:
CODETEXT7
CODE8
Here's the code:
CODETEXT8
CODE9
Here's the code:
CODETEXT9
CODE10
Here's the code:
CODETEXT10
Ready to elevate your UI design game? With Subframe, you can create pixel-perfect interfaces, including stunning flat buttons, in minutes. Our drag-and-drop editor ensures efficiency and precision.
Don't wait—start designing immediately. Start for free and see the difference Subframe can make!
<html> <head> <style> * { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif; } body { display: flex; justify-content: center; align-items: center; min-height: 100vh; background-color: #f9f9f9; } .cart-container { width: 100%; max-width: 600px; background-color: white; border-radius: 16px; box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05); padding: 32px; transition: all 0.3s ease; } .cart-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 24px; } .cart-title { font-size: 22px; font-weight: 700; color: #222; } .cart-count { background-color: #f0f0f0; border-radius: 20px; padding: 6px 12px; font-size: 14px; color: #555; } .cart-items { margin-bottom: 28px; } .cart-item { display: flex; align-items: center; padding: 12px 0; border-bottom: 1px solid #f0f0f0; } .cart-item:last-child { border-bottom: none; } .item-image { width: 60px; height: 60px; border-radius: 8px; background-color: #f5f5f5; margin-right: 16px; overflow: hidden; flex-shrink: 0; } .item-image img { width: 100%; height: 100%; object-fit: cover; } .item-details { flex: 1; } .item-name { font-size: 16px; font-weight: 600; color: #222; margin-bottom: 4px; } .item-variant { font-size: 14px; color: #777; margin-bottom: 2px; } .item-price { font-size: 16px; font-weight: 600; color: #222; } .cart-summary { background-color: #f9f9f9; border-radius: 12px; padding: 20px; margin-bottom: 24px; } .summary-row { display: flex; justify-content: space-between; margin-bottom: 12px; } .summary-row:last-child { margin-bottom: 0; padding-top: 12px; border-top: 1px dashed #ddd; } .summary-label { font-size: 15px; color: #555; } .summary-value { font-size: 15px; font-weight: 600; color: #222; } .summary-row:last-child .summary-label, .summary-row:last-child .summary-value { font-weight: 700; color: #000; } .checkout-btn { position: relative; width: 100%; padding: 16px; background-color: #FF385C; color: white; border: none; border-radius: 10px; font-size: 16px; font-weight: 600; cursor: pointer; overflow: hidden; transition: transform 0.2s ease, box-shadow 0.2s ease; } .checkout-btn:hover { transform: translateY(-2px); box-shadow: 0 6px 18px rgba(255, 56, 92, 0.25); } .checkout-btn:active { transform: translateY(0); } .checkout-btn .btn-text { position: relative; z-index: 2; display: flex; align-items: center; justify-content: center; gap: 8px; } .checkout-btn .btn-bg { position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: linear-gradient(90deg, #FF385C, #FF385C); z-index: 1; } .checkout-btn .btn-wave { position: absolute; top: 0; left: -100%; width: 200%; height: 100%; background: linear-gradient(90deg, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.3) 50%, rgba(255, 255, 255, 0) 100%); z-index: 1; transition: left 0.5s ease; } .checkout-btn:hover .btn-wave { left: 100%; } .security-note { display: flex; align-items: center; justify-content: center; margin-top: 16px; font-size: 14px; color: #777; gap: 8px; } .security-note svg { flex-shrink: 0; } @media (max-width: 500px) { .cart-container { padding: 20px; border-radius: 12px; } .cart-title { font-size: 20px; } .item-image { width: 50px; height: 50px; } .item-name { font-size: 15px; } .item-variant { font-size: 13px; } .cart-summary { padding: 16px; } } /* Checkout success animation */ @keyframes checkmark { 0% { stroke-dashoffset: 100; } 100% { stroke-dashoffset: 0; } } .checkout-success { display: none; flex-direction: column; align-items: center; justify-content: center; text-align: center; } .success-checkmark { width: 80px; height: 80px; margin-bottom: 24px; } .success-checkmark circle { fill: #edf7ed; } .success-checkmark path { stroke: #4CAF50; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 100; stroke-dashoffset: 100; animation: checkmark 1s ease-in-out forwards; } .success-title { font-size: 22px; font-weight: 700; color: #222; margin-bottom: 12px; } .success-message { font-size: 16px; color: #555; margin-bottom: 24px; max-width: 280px; } .return-btn { background: transparent; border: 1px solid #ddd; border-radius: 8px; padding: 12px 24px; font-size: 15px; font-weight: 600; color: #555; cursor: pointer; transition: all 0.2s ease; } .return-btn:hover { background-color: #f5f5f5; color: #222; } </style> </head> <body> <div class="cart-container" id="cart-container"> <div class="cart-header"> <h1 class="cart-title">Your Cart</h1> <div class="cart-count">3 items</div> </div> <div class="cart-items"> <div class="cart-item"> <div class="item-image"> <img src="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSI2MCIgaGVpZ2h0PSI2MCIgdmlld0JveD0iMCAwIDYwIDYwIj48cmVjdCB3aWR0aD0iNjAiIGhlaWdodD0iNjAiIGZpbGw9IiNmMGYwZjAiLz48cGF0aCBkPSJNMjAgMTVoMjB2MzBIMjB6IiBmaWxsPSIjZGRkIi8+PHBhdGggZD0iTTMwIDI1YzAtMi44IDIuMi01IDUtNXM1IDIuMiA1IDVjMCAyLjgtMi4yIDUtNSA1cy01LTIuMi01LTV6IiBmaWxsPSIjY2NjIi8+PC9zdmc+" alt="Wireless Headphones"> </div> <div class="item-details"> <div class="item-name">Wireless Headphones</div> <div class="item-variant">Matte Black</div> </div> <div class="item-price">$129.99</div> </div> <div class="cart-item"> <div class="item-image"> <img src="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSI2MCIgaGVpZ2h0PSI2MCIgdmlld0JveD0iMCAwIDYwIDYwIj48cmVjdCB3aWR0aD0iNjAiIGhlaWdodD0iNjAiIGZpbGw9IiNmMGYwZjAiLz48cmVjdCB4PSIxNSIgeT0iMjAiIHdpZHRoPSIzMCIgaGVpZ2h0PSIyMCIgcng9IjIiIGZpbGw9IiNkZGQiLz48cmVjdCB4PSIyMCIgeT0iMjUiIHdpZHRoPSIyMCIgaGVpZ2h0PSIxMCIgZmlsbD0iI2NjYyIvPjwvc3ZnPg==" alt="Smart Watch"> </div> <div class="item-details"> <div class="item-name">Smart Watch Series X</div> <div class="item-variant">Silver - 44mm</div> </div> <div class="item-price">$349.00</div> </div> <div class="cart-item"> <div class="item-image"> <img src="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSI2MCIgaGVpZ2h0PSI2MCIgdmlld0JveD0iMCAwIDYwIDYwIj48cmVjdCB3aWR0aD0iNjAiIGhlaWdodD0iNjAiIGZpbGw9IiNmMGYwZjAiLz48cmVjdCB4PSIxMCIgeT0iMTUiIHdpZHRoPSI0MCIgaGVpZ2h0PSIzMCIgcng9IjMiIGZpbGw9IiNkZGQiLz48Y2lyY2xlIGN4PSIzMCIgY3k9IjMwIiByPSI4IiBmaWxsPSIjY2NjIi8+PC9zdmc+" alt="Portable Charger"> </div> <div class="item-details"> <div class="item-name">Portable Charger</div> <div class="item-variant">20,000mAh</div> </div> <div class="item-price">$49.95</div> </div> </div> <div class="cart-summary"> <div class="summary-row"> <div class="summary-label">Subtotal</div> <div class="summary-value">$528.94</div> </div> <div class="summary-row"> <div class="summary-label">Shipping</div> <div class="summary-value">$0.00</div> </div> <div class="summary-row"> <div class="summary-label">Tax</div> <div class="summary-value">$42.32</div> </div> <div class="summary-row"> <div class="summary-label">Total</div> <div class="summary-value">$571.26</div> </div> </div> <button class="checkout-btn" id="checkout-btn"> <div class="btn-bg"></div> <div class="btn-wave"></div> <div class="btn-text"> Complete Checkout <svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg"> <path d="M3.33331 8H12.6666" stroke="white" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/> <path d="M8 3.33337L12.6667 8.00004L8 12.6667" stroke="white" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/> </svg> </div> </button> <div class="security-note"> <svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg"> <path d="M8.00002 14.6667C8.00002 14.6667 13.3334 12 13.3334 8.00001V3.33334L8.00002 1.33334L2.66669 3.33334V8.00001C2.66669 12 8.00002 14.6667 8.00002 14.6667Z" stroke="#777777" stroke-width="1.2" stroke-linecap="round" stroke-linejoin="round"/> </svg> Secure checkout with 256-bit SSL encryption </div> </div> <div class="checkout-success" id="checkout-success"> <svg class="success-checkmark" viewBox="0 0 52 52" xmlns="http://www.w3.org/2000/svg"> <circle cx="26" cy="26" r="25" /> <path d="M14.1 27.2l7.1 7.2 16.7-16.8" fill="none" /> </svg> <h2 class="success-title">Payment Successful!</h2> <p class="success-message">Your order has been placed and will be shipped within 2 business days.</p> <button class="return-btn" id="return-btn">Back to Shopping</button> </div> <script> document.addEventListener('DOMContentLoaded', function() { const cartContainer = document.getElementById('cart-container'); const checkoutSuccess = document.getElementById('checkout-success'); const checkoutBtn = document.getElementById('checkout-btn'); const returnBtn = document.getElementById('return-btn'); // Add hover effect animation for the button wave checkoutBtn.addEventListener('mouseenter', function() { const btnWave = this.querySelector('.btn-wave'); btnWave.style.left = '-100%'; setTimeout(() => { btnWave.style.left = '100%'; }, 50); }); // Handle checkout button click checkoutBtn.addEventListener('click', function() { // Add loading state this.disabled = true; const originalText = this.querySelector('.btn-text').innerHTML; this.querySelector('.btn-text').innerHTML = '<svg width="24" height="24" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><style>.spinner{transform-origin:center;animation:spin .75s infinite linear}@keyframes spin{100%{transform:rotate(360deg)}}</style><circle class="spinner" cx="12" cy="12" r="10" fill="none" stroke="white" stroke-width="2" stroke-dasharray="30 150" stroke-dashoffset="0"></circle></svg>'; // Simulate processing setTimeout(() => { cartContainer.style.display = 'none'; checkoutSuccess.style.display = 'flex'; }, 1500); }); // Handle return button click returnBtn.addEventListener('click', function() { checkoutSuccess.style.display = 'none'; cartContainer.style.display = 'block'; checkoutBtn.disabled = false; checkoutBtn.querySelector('.btn-text').innerHTML = 'Complete Checkout <svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M3.33331 8H12.6666" stroke="white" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/><path d="M8 3.33337L12.6667 8.00004L8 12.6667" stroke="white" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/></svg>'; }); }); </script> </body> </html>
<html> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Mobile App Button</title> <style> :root { --primary: #FF5252; --secondary: #4A68FF; --accent: #FF9E00; --dark: #252A34; --light: #F5F5FA; } * { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Segoe UI', -apple-system, BlinkMacSystemFont, Roboto, Oxygen, Ubuntu, sans-serif; } body { display: flex; flex-direction: column; justify-content: center; align-items: center; min-height: 100vh; background-color: #f8f9fa; padding: 20px; overflow-x: hidden; background: linear-gradient(135deg, var(--light) 0%, #e0e3ff 100%); } .container { max-width: 600px; width: 100%; padding: 30px; border-radius: 20px; background: #FFFFFF; box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08); display: flex; flex-direction: column; align-items: center; position: relative; overflow: hidden; } .container::after { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 8px; background: linear-gradient(90deg, var(--primary), var(--secondary), var(--accent)); } h1 { font-size: 28px; font-weight: 700; color: var(--dark); margin-bottom: 20px; text-align: center; } p { color: #5E636E; margin-bottom: 30px; text-align: center; line-height: 1.6; } .button-container { display: flex; justify-content: center; align-items: center; width: 100%; height: 150px; position: relative; } .btn { position: relative; background-color: var(--primary); color: white; border: none; padding: 16px 28px; font-size: 18px; font-weight: 600; letter-spacing: 0.5px; border-radius: 12px; cursor: pointer; overflow: hidden; transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275); outline: none; box-shadow: 0 6px 12px rgba(255, 82, 82, 0.2); z-index: 1; user-select: none; -webkit-tap-highlight-color: transparent; } .btn:active { transform: scale(0.95); box-shadow: 0 3px 6px rgba(255, 82, 82, 0.1); } .ripple { position: absolute; background-color: rgba(255, 255, 255, 0.3); border-radius: 50%; transform: scale(0); animation: ripple 0.6s ease-out; pointer-events: none; } @keyframes ripple { to { transform: scale(4); opacity: 0; } } .btn-color-switcher { display: flex; gap: 10px; margin: 30px 0 20px; } .color-option { width: 36px; height: 36px; border-radius: 50%; cursor: pointer; transition: transform 0.2s ease; box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1); position: relative; } .color-option:hover { transform: translateY(-3px); } .color-option.active::after { content: ''; position: absolute; width: 46px; height: 46px; border: 2px solid var(--dark); border-radius: 50%; top: -7px; left: -7px; animation: pulse 1.5s infinite; } @keyframes pulse { 0% { transform: scale(1); opacity: 0.5; } 50% { transform: scale(1.05); opacity: 0.3; } 100% { transform: scale(1); opacity: 0.5; } } .color-red { background-color: var(--primary); } .color-blue { background-color: var(--secondary); } .color-orange { background-color: var(--accent); } .feedback-text { margin-top: 30px; font-size: 16px; font-weight: 500; opacity: 0; transition: opacity 0.3s ease; color: var(--dark); } .button-label { position: absolute; top: -30px; left: 50%; transform: translateX(-50%); font-size: 14px; font-weight: 600; color: var(--dark); opacity: 0.7; } .device-frame { border: 12px solid #333; border-radius: 36px; padding: 15px; background-color: #f0f2f5; margin-bottom: 30px; width: 100%; max-width: 340px; position: relative; } .device-frame::before { content: ''; position: absolute; top: -4px; left: 50%; transform: translateX(-50%); width: 120px; height: 20px; background-color: #333; border-radius: 0 0 16px 16px; z-index: 2; } .device-content { background-color: white; border-radius: 20px; padding: 20px; height: 250px; display: flex; flex-direction: column; justify-content: center; align-items: center; position: relative; } .app-header { position: absolute; top: 0; left: 0; right: 0; padding: 15px; background: rgba(255, 255, 255, 0.95); border-radius: 20px 20px 0 0; display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid rgba(0, 0, 0, 0.05); } .app-title { font-weight: 600; font-size: 18px; color: var(--dark); } .app-icon { width: 24px; height: 24px; display: flex; justify-content: center; align-items: center; } .responsive-message { display: none; text-align: center; padding: 20px; color: var(--dark); font-weight: 500; } @media (max-width: 480px) { .container { padding: 20px; } h1 { font-size: 22px; } .device-frame { border-width: 8px; padding: 10px; } .device-content { height: 220px; } } @media (max-width: 360px) { .responsive-message { display: block; } .device-frame { display: none; } } </style> </head> <body> <div class="container"> <h1>Instant Feedback Button Design</h1> <p>This flat mobile button provides instant visual feedback when touched, featuring bold colors and clear typography for optimal user experience.</p> <div class="device-frame"> <div class="device-content"> <div class="app-header"> <div class="app-icon"> <svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"> <path d="M12 22C17.5228 22 22 17.5228 22 12C22 6.47715 17.5228 2 12 2C6.47715 2 2 6.47715 2 12C2 17.5228 6.47715 22 12 22Z" stroke="#252A34" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/> <path d="M12 16V12" stroke="#252A34" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/> <path d="M12 8H12.01" stroke="#252A34" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/> </svg> </div> <div class="app-title">FreshFit Timer</div> <div class="app-icon"> <svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"> <path d="M12 13C12.5523 13 13 12.5523 13 12C13 11.4477 12.5523 11 12 11C11.4477 11 11 11.4477 11 12C11 12.5523 11.4477 13 12 13Z" stroke="#252A34" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/> <path d="M19 13C19.5523 13 20 12.5523 20 12C20 11.4477 19.5523 11 19 11C18.4477 11 18 11.4477 18 12C18 12.5523 18.4477 13 19 13Z" stroke="#252A34" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/> <path d="M5 13C5.55228 13 6 12.5523 6 12C6 11.4477 5.55228 11 5 11C4.44772 11 4 11.4477 4 12C4 12.5523 4.44772 13 5 13Z" stroke="#252A34" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/> </svg> </div> </div> <div class="button-container"> <div class="button-label">Tap the button</div> <button class="btn" id="actionButton">Start Workout</button> </div> </div> </div> <div class="responsive-message"> Viewing on a small screen? The button is fully functional below. </div> <div class="btn-color-switcher"> <div class="color-option color-red active" data-color="var(--primary)" data-text="Start Workout"></div> <div class="color-option color-blue" data-color="var(--secondary)" data-text="Sync Device"></div> <div class="color-option color-orange" data-color="var(--accent)" data-text="Log Progress"></div> </div> <div class="feedback-text" id="feedbackText">Button pressed!</div> </div> <script> document.addEventListener('DOMContentLoaded', function() { const button = document.getElementById('actionButton'); const feedbackText = document.getElementById('feedbackText'); const colorOptions = document.querySelectorAll('.color-option'); // Ripple effect button.addEventListener('mousedown', createRipple); button.addEventListener('touchstart', function(e) { e.preventDefault(); createRipple(e); }); function createRipple(event) { const button = event.currentTarget; const circle = document.createElement('span'); const diameter = Math.max(button.clientWidth, button.clientHeight); const radius = diameter / 2; // Get position for the ripple let x, y; if (event.type === 'touchstart') { x = event.touches[0].clientX - button.getBoundingClientRect().left; y = event.touches[0].clientY - button.getBoundingClientRect().top; } else { x = event.clientX - button.getBoundingClientRect().left; y = event.clientY - button.getBoundingClientRect().top; } circle.style.width = circle.style.height = `${diameter}px`; circle.style.left = `${x - radius}px`; circle.style.top = `${y - radius}px`; circle.classList.add('ripple'); // Remove existing ripples const ripple = button.getElementsByClassName('ripple')[0]; if (ripple) { ripple.remove(); } button.appendChild(circle); // Show feedback text feedbackText.style.opacity = '1'; setTimeout(() => { feedbackText.style.opacity = '0'; }, 1500); } // Color switcher functionality colorOptions.forEach(option => { option.addEventListener('click', function() { // Update active state colorOptions.forEach(opt => opt.classList.remove('active')); this.classList.add('active'); // Change button color and text const color = this.getAttribute('data-color'); const text = this.getAttribute('data-text'); button.style.backgroundColor = color; button.style.boxShadow = `0 6px 12px ${color}33`; button.textContent = text; // Add animation for smooth transition button.classList.add('color-changing'); setTimeout(() => { button.classList.remove('color-changing'); }, 300); }); }); // Handle button click (without form submission) button.addEventListener('click', function(e) { e.preventDefault(); button.blur(); // Remove focus }); }); </script> </body> </html>
<html> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <style> * { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif; } body { display: flex; justify-content: center; align-items: center; min-height: 100vh; background-color: #f9f4ff; background-image: radial-gradient(circle at 10% 20%, rgba(255, 140, 140, 0.1) 0%, transparent 20%), radial-gradient(circle at 90% 80%, rgba(140, 140, 255, 0.1) 0%, transparent 20%); padding: 20px; } .content-card { background: white; border-radius: 20px; max-width: 600px; width: 100%; padding: 30px; box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05); position: relative; overflow: hidden; } .content-card::before { content: ''; position: absolute; top: 0; left: 0; width: 6px; height: 100%; background: linear-gradient(to bottom, #FF6B6B, #6B66FF); } h1 { font-size: 28px; margin-bottom: 15px; color: #333; font-weight: 700; } p { color: #555; line-height: 1.6; margin-bottom: 25px; font-size: 16px; } .share-buttons { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; } .share-button { position: relative; display: flex; align-items: center; justify-content: center; gap: 10px; padding: 12px 24px; border-radius: 50px; border: none; background: #f0f0f0; color: #444; font-weight: 600; font-size: 16px; cursor: pointer; overflow: hidden; transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.3s ease, color 0.3s ease; box-shadow: 0 4px 6px rgba(0, 0, 0, 0.08); } .share-button:before { content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: linear-gradient(120deg, rgba(255,255,255,0.2), rgba(255,255,255,0)); z-index: 0; } .share-button span, .share-button svg { position: relative; z-index: 2; } .share-button svg { width: 20px; height: 20px; transition: transform 0.3s ease; } .share-button:hover { transform: translateY(-3px); box-shadow: 0 7px 14px rgba(0, 0, 0, 0.12); } .share-button:hover svg { transform: scale(1.2); } /* Social button styles */ .twitter { background: #1DA1F2; color: white; } .facebook { background: #4267B2; color: white; } .linkedin { background: #0077B5; color: white; } .copy-link { background: #8E44AD; color: white; } .tooltip { position: absolute; top: -40px; left: 50%; transform: translateX(-50%) translateY(10px); background: #333; color: white; padding: 5px 10px; border-radius: 4px; font-size: 12px; opacity: 0; visibility: hidden; transition: opacity 0.3s, transform 0.3s, visibility 0s 0.3s; white-space: nowrap; } .tooltip::after { content: ''; position: absolute; top: 100%; left: 50%; transform: translateX(-50%); border-width: 5px; border-style: solid; border-color: #333 transparent transparent transparent; } .share-button.copied .tooltip { opacity: 1; visibility: visible; transform: translateX(-50%) translateY(0); transition: opacity 0.3s, transform 0.3s, visibility 0s; } .pulse { animation: pulse 0.5s cubic-bezier(0.66, 0, 0, 1); } @keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(142, 68, 173, 0.7); } 70% { box-shadow: 0 0 0 10px rgba(142, 68, 173, 0); } 100% { box-shadow: 0 0 0 0 rgba(142, 68, 173, 0); } } .social-wave { position: absolute; bottom: 0; left: 0; width: 100%; height: 40px; z-index: -1; opacity: 0.6; } .share-label { display: flex; align-items: center; gap: 10px; margin-bottom: 15px; color: #666; font-weight: 500; } .share-label::before, .share-label::after { content: ''; height: 1px; background: linear-gradient(to right, transparent, rgba(0,0,0,0.1), transparent); flex-grow: 1; } /* Responsive */ @media (max-width: 600px) { .content-card { padding: 20px; } h1 { font-size: 24px; } .share-buttons { justify-content: center; } .share-button { flex: 1 0 calc(50% - 12px); min-width: 130px; justify-content: center; } } @media (max-width: 400px) { .share-button { flex: 1 0 100%; } } </style> </head> <body> <div class="content-card"> <h1>Share is the new like. Spread the word!</h1> <p>Give your content the airtime it deserves. Our one-click social sharing buttons make it easy to spread your message across all major platforms while preserving your carefully crafted formatting and visuals.</p> <div class="share-label">Spread the word</div> <div class="share-buttons"> <button class="share-button twitter" aria-label="Share on Twitter"> <svg viewBox="0 0 24 24" fill="currentColor"><path d="M22.46,6C21.69,6.35 20.86,6.58 20,6.69C20.88,6.16 21.56,5.32 21.88,4.31C21.05,4.81 20.13,5.16 19.16,5.36C18.37,4.5 17.26,4 16,4C13.65,4 11.73,5.92 11.73,8.29C11.73,8.63 11.77,8.96 11.84,9.27C8.28,9.09 5.11,7.38 3,4.79C2.63,5.42 2.42,6.16 2.42,6.94C2.42,8.43 3.17,9.75 4.33,10.5C3.62,10.5 2.96,10.3 2.38,10C2.38,10 2.38,10 2.38,10.03C2.38,12.11 3.86,13.85 5.82,14.24C5.46,14.34 5.08,14.39 4.69,14.39C4.42,14.39 4.15,14.36 3.89,14.31C4.43,16 6,17.26 7.89,17.29C6.43,18.45 4.58,19.13 2.56,19.13C2.22,19.13 1.88,19.11 1.54,19.07C3.44,20.29 5.7,21 8.12,21C16,21 20.33,14.46 20.33,8.79C20.33,8.6 20.33,8.42 20.32,8.23C21.16,7.63 21.88,6.87 22.46,6Z" /></svg> <span>Twitter</span> </button> <button class="share-button facebook" aria-label="Share on Facebook"> <svg viewBox="0 0 24 24" fill="currentColor"><path d="M12 2.04C6.5 2.04 2 6.53 2 12.06C2 17.06 5.66 21.21 10.44 21.96V14.96H7.9V12.06H10.44V9.85C10.44 7.34 11.93 5.96 14.22 5.96C15.31 5.96 16.45 6.15 16.45 6.15V8.62H15.19C13.95 8.62 13.56 9.39 13.56 10.18V12.06H16.34L15.89 14.96H13.56V21.96A10 10 0 0 0 22 12.06C22 6.53 17.5 2.04 12 2.04Z" /></svg> <span>Facebook</span> </button> <button class="share-button linkedin" aria-label="Share on LinkedIn"> <svg viewBox="0 0 24 24" fill="currentColor"><path d="M19 3A2 2 0 0 1 21 5V19A2 2 0 0 1 19 21H5A2 2 0 0 1 3 19V5A2 2 0 0 1 5 3H19M18.5 18.5V13.2A3.26 3.26 0 0 0 15.24 9.94C14.39 9.94 13.4 10.46 12.92 11.24V10.13H10.13V18.5H12.92V13.57C12.92 12.8 13.54 12.17 14.31 12.17A1.4 1.4 0 0 1 15.71 13.57V18.5H18.5M6.88 8.56A1.68 1.68 0 0 0 8.56 6.88C8.56 5.95 7.81 5.19 6.88 5.19A1.69 1.69 0 0 0 5.19 6.88C5.19 7.81 5.95 8.56 6.88 8.56M8.27 18.5V10.13H5.5V18.5H8.27Z" /></svg> <span>LinkedIn</span> </button> <button class="share-button copy-link" aria-label="Copy Link"> <svg viewBox="0 0 24 24" fill="currentColor"><path d="M10.59,13.41C11,13.8 11,14.44 10.59,14.83C10.2,15.22 9.56,15.22 9.17,14.83C7.22,12.88 7.22,9.71 9.17,7.76V7.76L12.71,4.22C14.66,2.27 17.83,2.27 19.78,4.22C21.73,6.17 21.73,9.34 19.78,11.29L18.29,12.78C18.3,11.96 18.17,11.14 17.89,10.36L18.36,9.88C19.54,8.71 19.54,6.81 18.36,5.64C17.19,4.46 15.29,4.46 14.12,5.64L10.59,9.17C9.41,10.34 9.41,12.24 10.59,13.41M13.41,9.17C13.8,8.78 14.44,8.78 14.83,9.17C16.78,11.12 16.78,14.29 14.83,16.24V16.24L11.29,19.78C9.34,21.73 6.17,21.73 4.22,19.78C2.27,17.83 2.27,14.66 4.22,12.71L5.71,11.22C5.7,12.04 5.83,12.86 6.11,13.65L5.64,14.12C4.46,15.29 4.46,17.19 5.64,18.36C6.81,19.54 8.71,19.54 9.88,18.36L13.41,14.83C14.59,13.66 14.59,11.76 13.41,10.59C13,10.2 13,9.56 13.41,9.17Z" /></svg> <span>Copy Link</span> <div class="tooltip">Link copied!</div> </button> </div> <svg class="social-wave" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1440 320"> <path fill="#FF6B6B" fill-opacity="0.2" d="M0,96L60,112C120,128,240,160,360,160C480,160,600,128,720,122.7C840,117,960,139,1080,144C1200,149,1320,139,1380,133.3L1440,128L1440,320L1380,320C1320,320,1200,320,1080,320C960,320,840,320,720,320C600,320,480,320,360,320C240,320,120,320,60,320L0,320Z"></path> <path fill="#6B66FF" fill-opacity="0.1" d="M0,256L60,234.7C120,213,240,171,360,149.3C480,128,600,128,720,154.7C840,181,960,235,1080,245.3C1200,256,1320,224,1380,208L1440,192L1440,320L1380,320C1320,320,1200,320,1080,320C960,320,840,320,720,320C600,320,480,320,360,320C240,320,120,320,60,320L0,320Z"></path> </svg> </div> <script> document.addEventListener('DOMContentLoaded', function() { const twitterBtn = document.querySelector('.twitter'); const facebookBtn = document.querySelector('.facebook'); const linkedinBtn = document.querySelector('.linkedin'); const copyLinkBtn = document.querySelector('.copy-link'); const pageUrl = 'https://yourwebsite.com/amazing-content'; const pageTitle = 'Check out this awesome content!'; // Twitter Share twitterBtn.addEventListener('click', function() { const twitterUrl = `https://twitter.com/intent/tweet?text=${encodeURIComponent(pageTitle)}&url=${encodeURIComponent(pageUrl)}`; animateButtonClick(this); console.log('Twitter sharing: ' + twitterUrl); // In actual implementation, you would use: window.open(twitterUrl, '_blank'); }); // Facebook Share facebookBtn.addEventListener('click', function() { const facebookUrl = `https://www.facebook.com/sharer/sharer.php?u=${encodeURIComponent(pageUrl)}`; animateButtonClick(this); console.log('Facebook sharing: ' + facebookUrl); // In actual implementation, you would use: window.open(facebookUrl, '_blank'); }); // LinkedIn Share linkedinBtn.addEventListener('click', function() { const linkedinUrl = `https://www.linkedin.com/sharing/share-offsite/?url=${encodeURIComponent(pageUrl)}`; animateButtonClick(this); console.log('LinkedIn sharing: ' + linkedinUrl); // In actual implementation, you would use: window.open(linkedinUrl, '_blank'); }); // Copy Link functionality copyLinkBtn.addEventListener('click', function() { // Create a temporary textarea element to copy the URL const textarea = document.createElement('textarea'); textarea.value = pageUrl; document.body.appendChild(textarea); textarea.select(); try { console.log('Copying link: ' + pageUrl); // In an actual implementation, you would use document.execCommand('copy') // But we'll simulate success for this demo // Visual feedback for copy success copyLinkBtn.classList.add('copied', 'pulse'); setTimeout(() => { copyLinkBtn.classList.remove('copied'); }, 2000); setTimeout(() => { copyLinkBtn.classList.remove('pulse'); }, 500); } catch (err) { console.error('Failed to copy: ', err); } document.body.removeChild(textarea); }); // Animation for button clicks function animateButtonClick(button) { button.classList.add('pulse'); setTimeout(() => { button.classList.remove('pulse'); }, 500); } // Add hover effects to buttons const allButtons = document.querySelectorAll('.share-button'); allButtons.forEach(button => { button.addEventListener('mouseenter', function() { const icon = this.querySelector('svg'); if (icon) { icon.style.transform = 'scale(1.2) rotate(5deg)'; } }); button.addEventListener('mouseleave', function() { const icon = this.querySelector('svg'); if (icon) { icon.style.transform = ''; } }); }); }); </script> </body> </html>
<html> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Nova Headphones Landing Page</title> <style> * { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif; } :root { --accent-color: #FF3E6C; --accent-hover: #E8184A; --accent-active: #C4003E; --dark-text: #222230; --light-text: #F7F7F9; --neutral-gray: #8A8A9E; } body { display: flex; justify-content: center; align-items: center; min-height: 700px; background-color: #FCFCFC; padding: 20px; overflow-x: hidden; } .container { max-width: 650px; width: 100%; background: linear-gradient(135deg, #ffffff 0%, #f8f8f8 100%); border-radius: 20px; box-shadow: 0 10px 40px rgba(0, 0, 0, 0.04); padding: 40px; position: relative; overflow: hidden; } .product-container { display: flex; flex-direction: column; align-items: center; position: relative; } .product-image { width: 280px; height: 280px; position: relative; margin-bottom: 20px; transition: transform 0.8s ease-out; } .product-image img { width: 100%; height: 100%; object-fit: contain; position: relative; z-index: 2; filter: drop-shadow(0 20px 25px rgba(0, 0, 0, 0.15)); } .pulse-circle { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); width: 200px; height: 200px; border-radius: 50%; background-color: rgba(255, 62, 108, 0.05); z-index: 1; } .pulse-circle::before, .pulse-circle::after { content: ''; position: absolute; border: 2px solid rgba(255, 62, 108, 0.3); border-radius: 50%; top: 0; left: 0; right: 0; bottom: 0; animation: pulse 2.5s linear infinite; } .pulse-circle::after { animation-delay: 1.25s; } @keyframes pulse { 0% { transform: scale(0.5); opacity: 0; } 50% { opacity: 1; } 100% { transform: scale(1.3); opacity: 0; } } .product-title { font-size: 32px; color: var(--dark-text); font-weight: 700; text-align: center; margin-bottom: 12px; } .product-subtitle { font-size: 16px; color: var(--neutral-gray); text-align: center; margin-bottom: 24px; line-height: 1.5; max-width: 450px; } .price-container { display: flex; align-items: center; justify-content: center; margin-bottom: 30px; gap: 12px; } .price { font-size: 28px; font-weight: 700; color: var(--dark-text); } .original-price { font-size: 20px; color: var(--neutral-gray); text-decoration: line-through; } .discount-badge { background-color: rgba(255, 62, 108, 0.1); color: var(--accent-color); font-weight: 600; font-size: 14px; padding: 4px 10px; border-radius: 12px; } .promotion-btn { position: relative; padding: 16px 32px; background-color: var(--accent-color); color: var(--light-text); border: none; border-radius: 12px; font-size: 16px; font-weight: 600; cursor: pointer; transition: all 0.3s ease; outline: none; display: flex; align-items: center; justify-content: center; gap: 8px; overflow: hidden; transform: translateY(0); box-shadow: 0 6px 16px rgba(255, 62, 108, 0.25); } .promotion-btn:hover { background-color: var(--accent-hover); transform: translateY(-2px); box-shadow: 0 8px 20px rgba(255, 62, 108, 0.35); } .promotion-btn:active { background-color: var(--accent-active); transform: translateY(1px); box-shadow: 0 4px 10px rgba(255, 62, 108, 0.2); } .btn-text-container { display: flex; flex-direction: column; align-items: flex-start; } .btn-text { font-size: 16px; font-weight: 600; } .btn-subtext { font-size: 12px; font-weight: 400; opacity: 0.85; } .btn-icon { font-size: 20px; } .btn-ripple { position: absolute; border-radius: 50%; background-color: rgba(255, 255, 255, 0.3); transform: scale(0); animation: ripple 0.6s linear; } @keyframes ripple { to { transform: scale(4); opacity: 0; } } .features { display: flex; justify-content: center; margin-top: 30px; gap: 30px; flex-wrap: wrap; } .feature { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--neutral-gray); } .feature i { color: var(--accent-color); } @media (max-width: 600px) { .container { padding: 25px; } .product-image { width: 220px; height: 220px; } .product-title { font-size: 26px; } .product-subtitle { font-size: 14px; } .price { font-size: 24px; } .promotion-btn { padding: 14px 24px; } .features { gap: 15px; } } /* Floating particles */ .particles { position: absolute; z-index: 0; top: 0; left: 0; width: 100%; height: 100%; pointer-events: none; } .particle { position: absolute; background-color: var(--accent-color); border-radius: 50%; opacity: 0.2; animation: float 20s infinite ease-in-out; } .particle:nth-child(1) { width: 40px; height: 40px; top: 10%; left: 15%; animation-delay: 0s; animation-duration: 25s; } .particle:nth-child(2) { width: 25px; height: 25px; top: 60%; left: 10%; animation-delay: 1s; animation-duration: 18s; } .particle:nth-child(3) { width: 20px; height: 20px; top: 20%; left: 80%; animation-delay: 3s; animation-duration: 22s; } .particle:nth-child(4) { width: 35px; height: 35px; top: 70%; left: 85%; animation-delay: 5s; animation-duration: 20s; } @keyframes float { 0% { transform: translate(0, 0) rotate(0deg); } 25% { transform: translate(10px, 30px) rotate(90deg); } 50% { transform: translate(30px, -10px) rotate(180deg); } 75% { transform: translate(-20px, -30px) rotate(270deg); } 100% { transform: translate(0, 0) rotate(360deg); } } /* Added for inventory-timer feature */ .inventory-timer { display: flex; align-items: center; justify-content: center; margin-top: 20px; gap: 8px; color: var(--dark-text); font-size: 14px; background-color: rgba(255, 62, 108, 0.06); padding: 8px 16px; border-radius: 8px; } .inventory-icon { color: var(--accent-color); } .timer-count { font-weight: 600; color: var(--accent-color); } </style> </head> <body> <div class="container"> <div class="particles"> <div class="particle"></div> <div class="particle"></div> <div class="particle"></div> <div class="particle"></div> </div> <div class="product-container"> <div class="product-image"> <img src="https://images.unsplash.com/photo-1618366712010-f4ae9c647dcb?q=80&w=1000&auto=format&fit=crop" alt="Nova AirSonic Pro Headphones"> <div class="pulse-circle"></div> </div> <h1 class="product-title">Nova AirSonic Pro</h1> <p class="product-subtitle">Experience studio-quality sound with active noise cancellation and 40-hour battery life in our lightest wireless headphones ever.</p> <div class="price-container"> <span class="price">$149.99</span> <span class="original-price">$199.99</span> <span class="discount-badge">25% OFF</span> </div> <button class="promotion-btn" id="promotionBtn"> <span class="btn-icon">🎧</span> <div class="btn-text-container"> <span class="btn-text">Add to Cart</span> <span class="btn-subtext">Free shipping included</span> </div> </button> <div class="inventory-timer"> <i class="inventory-icon">⚡</i> <span>Limited stock: Only <span class="timer-count" id="inventoryCount">17</span> units left</span> </div> <div class="features"> <div class="feature"> <i>✓</i> <span>40h battery life</span> </div> <div class="feature"> <i>✓</i> <span>Active noise cancellation</span> </div> <div class="feature"> <i>✓</i> <span>2-year warranty</span> </div> </div> </div> </div> <script> // Button ripple effect document.getElementById('promotionBtn').addEventListener('click', function(e) { const button = this; // Create ripple effect const ripple = document.createElement('span'); ripple.classList.add('btn-ripple'); button.appendChild(ripple); // Position the ripple const rect = button.getBoundingClientRect(); const size = Math.max(rect.width, rect.height); ripple.style.width = ripple.style.height = `${size}px`; ripple.style.left = `${e.clientX - rect.left - size / 2}px`; ripple.style.top = `${e.clientY - rect.top - size / 2}px`; // Remove ripple after animation setTimeout(() => { ripple.remove(); }, 600); // Cart added animation button.classList.add('clicked'); button.querySelector('.btn-text').textContent = 'Added to Cart!'; setTimeout(() => { button.classList.remove('clicked'); button.querySelector('.btn-text').textContent = 'Add to Cart'; }, 1500); // Animate image const productImage = document.querySelector('.product-image'); productImage.style.transform = 'scale(1.05)'; setTimeout(() => { productImage.style.transform = 'scale(1)'; }, 400); // Update inventory count const inventoryCount = document.getElementById('inventoryCount'); let currentCount = parseInt(inventoryCount.textContent); if (currentCount > 1) { currentCount--; inventoryCount.textContent = currentCount; // Add urgency when low stock if (currentCount < 5) { inventoryCount.style.color = '#E8184A'; } } }); // Product image hover effect const productImage = document.querySelector('.product-image'); productImage.addEventListener('mousemove', function(e) { const rect = this.getBoundingClientRect(); const x = (e.clientX - rect.left) / rect.width - 0.5; const y = (e.clientY - rect.top) / rect.height - 0.5; this.style.transform = `perspective(1000px) rotateY(${x * 5}deg) rotateX(${-y * 5}deg) scale(1.05)`; }); productImage.addEventListener('mouseleave', function() { this.style.transform = 'perspective(1000px) rotateY(0) rotateX(0) scale(1)'; }); // Simulate limited stock countdown let currentCount = parseInt(document.getElementById('inventoryCount').textContent); setInterval(() => { if (Math.random() > 0.7 && currentCount > 1) { currentCount--; document.getElementById('inventoryCount').textContent = currentCount; if (currentCount < 5) { document.getElementById('inventoryCount').style.color = '#E8184A'; } } }, 15000); </script> </body> </html>
<html> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <style> * { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif; } :root { --primary: #4A8FE7; --primary-light: #5DA0FF; --primary-dark: #3A75C4; --bg-light: #F5F9FF; --text-dark: #2C3E50; --text-light: #6C8FB3; --success: #5BB98C; --error: #E67774; --border: #D7E3F3; } body { display: flex; justify-content: center; align-items: center; min-height: 700px; background-color: var(--bg-light); color: var(--text-dark); padding: 20px; } .container { width: 100%; max-width: 600px; background: white; border-radius: 24px; box-shadow: 0 12px 35px rgba(0, 42, 102, 0.08); padding: 32px; position: relative; overflow: hidden; } .background-pattern { position: absolute; top: 0; right: 0; width: 100%; height: 200px; background: linear-gradient(100deg, rgba(74, 143, 231, 0.05) 0%, rgba(163, 196, 243, 0.1) 100%); z-index: 0; clip-path: ellipse(80% 60% at 90% 0%); } .scheduler-header { position: relative; z-index: 1; margin-bottom: 28px; } h1 { font-size: 28px; font-weight: 600; color: var(--text-dark); margin-bottom: 12px; } p.subtitle { font-size: 16px; color: var(--text-light); line-height: 1.5; } .form-section { position: relative; z-index: 1; } .input-group { margin-bottom: 20px; } label { display: block; font-size: 15px; font-weight: 500; margin-bottom: 8px; color: var(--text-dark); } select, input { width: 100%; padding: 14px 16px; border-radius: 12px; border: 2px solid var(--border); font-size: 15px; transition: all 0.2s ease; color: var(--text-dark); background-color: white; appearance: none; } select { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%236C8FB3' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 16px center; padding-right: 42px; } select:focus, input:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(74, 143, 231, 0.15); } .date-time-row { display: flex; gap: 16px; } .date-time-row .input-group { flex: 1; } .schedule-button { position: relative; display: block; width: 100%; padding: 16px 24px; margin-top: 32px; background-color: var(--primary); color: white; border: none; border-radius: 14px; font-size: 16px; font-weight: 600; cursor: pointer; transition: all 0.3s ease; overflow: hidden; box-shadow: 0 6px 16px rgba(74, 143, 231, 0.25); } .schedule-button:hover { background-color: var(--primary-light); transform: translateY(-2px); box-shadow: 0 8px 20px rgba(74, 143, 231, 0.3); } .schedule-button:active { background-color: var(--primary-dark); transform: translateY(0); box-shadow: 0 4px 12px rgba(74, 143, 231, 0.2); } .schedule-button:focus { outline: none; box-shadow: 0 0 0 3px rgba(74, 143, 231, 0.3), 0 6px 16px rgba(74, 143, 231, 0.25); } .button-content { position: relative; z-index: 2; display: flex; align-items: center; justify-content: center; gap: 10px; } .ripple { position: absolute; border-radius: 50%; background-color: rgba(255, 255, 255, 0.4); transform: scale(0); animation: ripple 0.8s linear; z-index: 1; } @keyframes ripple { to { transform: scale(4); opacity: 0; } } .appointment-success { background-color: rgba(91, 185, 140, 0.1); border: 1px solid var(--success); border-radius: 12px; padding: 20px; margin-top: 24px; display: none; animation: fadeInUp 0.5s ease forwards; } .success-header { display: flex; align-items: center; margin-bottom: 12px; gap: 12px; } .success-icon { background-color: var(--success); width: 32px; height: 32px; border-radius: 50%; display: flex; align-items: center; justify-content: center; color: white; } .success-title { font-weight: 600; font-size: 16px; color: var(--success); } .appointment-info { font-size: 15px; color: var(--text-dark); line-height: 1.5; } .appointment-info strong { font-weight: 600; } @keyframes fadeInUp { from { opacity: 0; transform: translateY(15px); } to { opacity: 1; transform: translateY(0); } } @keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(74, 143, 231, 0.4); } 70% { box-shadow: 0 0 0 10px rgba(74, 143, 231, 0); } 100% { box-shadow: 0 0 0 0 rgba(74, 143, 231, 0); } } .highlight-field { animation: pulse 1.5s; } .icon { display: inline-block; width: 20px; height: 20px; } @media (max-width: 480px) { .container { padding: 24px; border-radius: 16px; } h1 { font-size: 24px; } .date-time-row { flex-direction: column; gap: 12px; } } </style> </head> <body> <div class="container"> <div class="background-pattern"></div> <div class="scheduler-header"> <h1>Schedule Your Appointment</h1> <p class="subtitle">Book a visit with one of our healthcare professionals quickly and easily. We'll help you find the perfect time that works with your schedule.</p> </div> <div class="form-section"> <div class="input-group"> <label for="appointment-type">Type of Appointment</label> <select id="appointment-type"> <option value="">Select appointment type</option> <option value="annual-checkup">Annual Check-up</option> <option value="follow-up">Follow-up Visit</option> <option value="consultation">New Patient Consultation</option> <option value="vaccination">Vaccination</option> <option value="lab-review">Lab Results Review</option> <option value="specialist">Specialist Referral</option> </select> </div> <div class="input-group"> <label for="doctor">Select Provider</label> <select id="doctor"> <option value="">Choose a healthcare provider</option> <option value="dr-patel">Dr. Patel - Family Medicine</option> <option value="dr-wong">Dr. Wong - Internal Medicine</option> <option value="dr-garcia">Dr. Garcia - Pediatrics</option> <option value="dr-johnson">Dr. Johnson - OB/GYN</option> <option value="dr-smith">Dr. Smith - Cardiology</option> </select> </div> <div class="date-time-row"> <div class="input-group"> <label for="date">Preferred Date</label> <input type="date" id="date" min="" /> </div> <div class="input-group"> <label for="time">Preferred Time</label> <select id="time"> <option value="">Select a time</option> <option value="morning">Morning (9AM - 12PM)</option> <option value="afternoon">Afternoon (1PM - 4PM)</option> <option value="evening">Evening (5PM - 7PM)</option> </select> </div> </div> <div class="input-group"> <label for="reason">Reason for Visit</label> <input type="text" id="reason" placeholder="Briefly describe your symptoms or reason" /> </div> <button class="schedule-button" id="schedule-btn"> <div class="button-content"> <span>Schedule Appointment</span> <svg class="icon" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"> <path d="M8 7V3m8 4V3m-9 8h10M5 21h14a2 2 0 0 0 2-2V7a2 2 0 0 0-2-2H5a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2z"></path> </svg> </div> </button> </div> <div class="appointment-success" id="success-message"> <div class="success-header"> <div class="success-icon"> <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"> <polyline points="20 6 9 17 4 12"></polyline> </svg> </div> <div class="success-title">Appointment Scheduled</div> </div> <p class="appointment-info"> Your appointment has been confirmed. You'll receive a confirmation email shortly with all the details. We look forward to seeing you! </p> </div> </div> <script> document.addEventListener('DOMContentLoaded', function() { // Set minimum date to today const today = new Date(); const formattedDate = today.toISOString().split('T')[0]; document.getElementById('date').min = formattedDate; // Button ripple effect const button = document.getElementById('schedule-btn'); button.addEventListener('click', function(e) { // Form validation const appointmentType = document.getElementById('appointment-type'); const doctor = document.getElementById('doctor'); const date = document.getElementById('date'); const time = document.getElementById('time'); const reason = document.getElementById('reason'); // Check if required fields are filled const requiredFields = [appointmentType, doctor, date, time]; let isValid = true; requiredFields.forEach(field => { if (!field.value) { field.classList.add('highlight-field'); isValid = false; // Remove highlight after animation setTimeout(() => { field.classList.remove('highlight-field'); }, 1500); } }); if (!isValid) { return; } // Create ripple effect const ripple = document.createElement('span'); ripple.classList.add('ripple'); button.appendChild(ripple); const buttonRect = button.getBoundingClientRect(); const diameter = Math.max(buttonRect.width, buttonRect.height); const radius = diameter / 2; ripple.style.width = ripple.style.height = `${diameter}px`; ripple.style.left = `${e.clientX - buttonRect.left - radius}px`; ripple.style.top = `${e.clientY - buttonRect.top - radius}px`; // Show success message after a small delay setTimeout(() => { document.getElementById('success-message').style.display = 'block'; // Scroll to the success message document.getElementById('success-message').scrollIntoView({ behavior: 'smooth', block: 'nearest' }); }, 800); // Clean up ripple element setTimeout(() => { ripple.remove(); }, 800); }); // Interactive form fields const formFields = document.querySelectorAll('select, input'); formFields.forEach(field => { field.addEventListener('focus', function() { this.parentElement.style.position = 'relative'; this.parentElement.style.zIndex = '2'; }); field.addEventListener('blur', function() { this.parentElement.style.zIndex = '1'; }); }); }); </script> </body> </html>
<html> <head> <style> @import url('https://fonts.googleapis.com/css2?family=Outfit:wght@400;600;700&display=swap'); * { margin: 0; padding: 0; box-sizing: border-box; } body { display: flex; justify-content: center; align-items: center; min-height: 700px; font-family: 'Outfit', sans-serif; background-color: #F6F9FC; background-image: radial-gradient(circle at 30% 20%, rgba(101, 118, 255, 0.08) 0%, transparent 20%), radial-gradient(circle at 70% 60%, rgba(255, 128, 103, 0.08) 0%, transparent 20%); } .platform-container { width: 90%; max-width: 650px; padding: 40px; text-align: center; border-radius: 16px; background-color: white; box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05); } h1 { font-size: 28px; font-weight: 700; color: #2D3748; margin-bottom: 20px; } p { font-size: 16px; line-height: 1.6; color: #4A5568; margin-bottom: 30px; } .button-container { display: flex; flex-direction: column; align-items: center; margin-top: 20px; } .learn-button { position: relative; display: flex; align-items: center; justify-content: center; padding: 16px 32px; margin: 10px; font-family: 'Outfit', sans-serif; font-size: 16px; font-weight: 600; color: #fff; background: linear-gradient(135deg, #6576FF 0%, #4350E2 100%); border: none; border-radius: 50px; cursor: pointer; transition: all 0.3s ease; overflow: hidden; z-index: 1; width: 220px; box-shadow: 0 5px 15px rgba(101, 118, 255, 0.3); } .learn-button:before { content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: linear-gradient(135deg, #FF8067 0%, #FF5E55 100%); opacity: 0; z-index: -1; transition: opacity 0.4s ease; border-radius: 50px; } .learn-button:hover { transform: translateY(-2px) scale(1.02); box-shadow: 0 8px 20px rgba(101, 118, 255, 0.4); } .learn-button:hover:before { opacity: 1; } .learn-button:active { transform: translateY(1px); box-shadow: 0 4px 10px rgba(101, 118, 255, 0.3); } .button-icon { margin-left: 10px; transition: transform 0.3s ease; } .learn-button:hover .button-icon { transform: translateX(4px); } .button-options { display: flex; flex-wrap: wrap; justify-content: center; margin-top: 25px; } .option-button { padding: 12px 24px; margin: 8px; font-family: 'Outfit', sans-serif; font-size: 14px; font-weight: 600; color: #4A5568; background-color: #F0F4FF; border: none; border-radius: 8px; cursor: pointer; transition: all 0.25s ease; } .option-button:hover { background-color: #E6EAFE; color: #4350E2; transform: translateY(-2px); } .pulse { animation: pulse 1.5s infinite; } @keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(101, 118, 255, 0.4); } 70% { box-shadow: 0 0 0 10px rgba(101, 118, 255, 0); } 100% { box-shadow: 0 0 0 0 rgba(101, 118, 255, 0); } } .features { display: flex; flex-wrap: wrap; justify-content: center; margin-top: 40px; } .feature { display: flex; align-items: center; width: 45%; margin: 5px; font-size: 14px; color: #4A5568; } .feature-icon { display: flex; align-items: center; justify-content: center; width: 24px; height: 24px; margin-right: 8px; background-color: #F0F4FF; border-radius: 50%; color: #4350E2; } @media (max-width: 600px) { .platform-container { padding: 25px; } h1 { font-size: 24px; } .feature { width: 100%; } .button-options { flex-direction: column; align-items: center; } .option-button { width: 90%; } } </style> </head> <body> <div class="platform-container"> <h1>Horizon Learning Portal</h1> <p>Accelerate your skills with our interactive courses taught by industry experts. From coding to creative design, unlock your potential with personalized learning paths.</p> <div class="button-container"> <button id="mainButton" class="learn-button pulse"> Start Your Journey <span class="button-icon"> <svg width="16" height="16" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"> <path d="M5 12H19M19 12L12 5M19 12L12 19" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/> </svg> </span> </button> </div> <div class="button-options"> <button class="option-button">Web Development</button> <button class="option-button">Data Science</button> <button class="option-button">UX Design</button> <button class="option-button">Digital Marketing</button> </div> <div class="features"> <div class="feature"> <div class="feature-icon">✓</div> <span>Live Expert Sessions</span> </div> <div class="feature"> <div class="feature-icon">✓</div> <span>Project-Based Learning</span> </div> <div class="feature"> <div class="feature-icon">✓</div> <span>Skill Assessments</span> </div> <div class="feature"> <div class="feature-icon">✓</div> <span>Community Support</span> </div> </div> </div> <script> document.addEventListener('DOMContentLoaded', function() { const mainButton = document.getElementById('mainButton'); const optionButtons = document.querySelectorAll('.option-button'); // Remove pulse animation after 3 seconds setTimeout(() => { mainButton.classList.remove('pulse'); }, 3000); // Add click event to main button mainButton.addEventListener('click', function() { // Visual feedback on click this.style.transform = 'scale(0.95)'; // Reset scale after the click animation setTimeout(() => { this.style.transform = ''; // Change button text after click this.innerHTML = 'Exploring Courses <span class="button-icon"><svg width="16" height="16" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M5 12H19M19 12L12 5M19 12L12 19" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/></svg></span>'; // Highlight option buttons one by one optionButtons.forEach((button, index) => { setTimeout(() => { button.style.transform = 'translateY(-5px)'; button.style.backgroundColor = '#E6EAFE'; button.style.color = '#4350E2'; setTimeout(() => { button.style.transform = ''; button.style.backgroundColor = ''; button.style.color = ''; }, 600); }, index * 200); }); }, 200); }); // Add click events to option buttons optionButtons.forEach(button => { button.addEventListener('click', function() { // Reset all buttons optionButtons.forEach(btn => { btn.style.backgroundColor = '#F0F4FF'; btn.style.color = '#4A5568'; btn.style.boxShadow = 'none'; }); // Highlight the clicked button this.style.backgroundColor = '#4350E2'; this.style.color = '#FFFFFF'; this.style.boxShadow = '0 5px 15px rgba(101, 118, 255, 0.3)'; // Update main button text mainButton.innerHTML = `Explore ${this.textContent} <span class="button-icon"><svg width="16" height="16" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M5 12H19M19 12L12 5M19 12L12 19" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/></svg></span>`; mainButton.classList.remove('pulse'); }); }); }); </script> </body> </html>
<html> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <style> * { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; } body { display: flex; justify-content: center; align-items: center; height: 100vh; background: linear-gradient(135deg, #f5f7fa 0%, #e4eaf0 100%); padding: 20px; overflow: hidden; } .travel-container { width: 100%; max-width: 600px; background-color: white; border-radius: 24px; box-shadow: 0 20px 60px rgba(0, 0, 0, 0.1); padding: 40px; text-align: center; position: relative; overflow: hidden; } .destination-selector { margin-bottom: 30px; text-align: left; } h1 { font-size: 28px; color: #1f3b5f; margin-bottom: 15px; font-weight: 700; } .subtitle { font-size: 16px; color: #6c8bb3; margin-bottom: 30px; line-height: 1.5; } .destination-options { display: flex; gap: 15px; margin-bottom: 30px; flex-wrap: wrap; } .destination-option { background-color: rgba(236, 244, 255, 0.5); border: 2px solid transparent; border-radius: 14px; padding: 12px 18px; font-size: 14px; font-weight: 600; color: #4978b9; cursor: pointer; transition: all 0.3s ease; } .destination-option:hover, .destination-option.active { background-color: rgba(236, 244, 255, 1); border-color: #7cadeb; transform: translateY(-3px); } .booking-button { position: relative; display: inline-block; background: linear-gradient(135deg, #FF9966 0%, #FF5E62 100%); color: white; padding: 16px 35px; border-radius: 50px; font-weight: 600; font-size: 18px; cursor: pointer; border: none; overflow: hidden; transition: transform 0.3s ease, box-shadow 0.3s ease; z-index: 1; box-shadow: 0 7px 20px rgba(255, 94, 98, 0.3); letter-spacing: 0.5px; } .booking-button:before { content: ""; position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: linear-gradient(135deg, #36D1DC 0%, #5B86E5 100%); opacity: 0; z-index: -1; transition: opacity 0.5s ease; border-radius: 50px; } .booking-button:hover { transform: translateY(-5px); box-shadow: 0 12px 25px rgba(91, 134, 229, 0.4); } .booking-button:hover:before { opacity: 1; } .booking-button:active { transform: translateY(-2px); } .booking-icon { display: inline-block; margin-left: 10px; font-size: 20px; transition: transform 0.3s ease; } .booking-button:hover .booking-icon { transform: translateX(5px); } .decorative-element { position: absolute; background-color: rgba(255, 153, 102, 0.1); border-radius: 50%; } .element-1 { width: 150px; height: 150px; top: -50px; right: -50px; } .element-2 { width: 100px; height: 100px; bottom: -30px; left: -30px; } .price-tag { position: absolute; top: 15px; right: 15px; background: rgba(255, 255, 255, 0.9); border-radius: 12px; padding: 8px 15px; font-size: 14px; color: #1f3b5f; font-weight: 700; box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05); } .price-tag span { color: #FF5E62; } @media screen and (max-width: 600px) { .travel-container { padding: 30px 20px; } h1 { font-size: 24px; } .subtitle { font-size: 14px; } .booking-button { padding: 14px 28px; font-size: 16px; } .destination-option { padding: 10px 14px; font-size: 13px; } .destination-options { justify-content: center; } } /* Wave Animation */ .wave-container { position: absolute; bottom: 0; left: 0; width: 100%; height: 15px; overflow: hidden; } .wave { position: absolute; bottom: 0; left: 0; width: 200%; height: 100%; background: url('data:image/svg+xml;utf8,<svg viewBox="0 0 1200 120" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"><path d="M0,0V46.29c47.79,22.2,103.59,32.17,158,28,70.36-5.37,136.33-33.31,206.8-37.5C438.64,32.43,512.34,53.67,583,72.05c69.27,18,138.3,24.88,209.4,13.08,36.15-6,69.85-17.84,104.45-29.34C989.49,25,1113-14.29,1200,52.47V0Z" opacity=".25" fill="%235B86E5"/><path d="M0,0V15.81C13,36.92,27.64,56.86,47.69,72.05,99.41,111.27,165,111,224.58,91.58c31.15-10.15,60.09-26.07,89.67-39.8,40.92-19,84.73-46,130.83-49.67,36.26-2.85,70.9,9.42,98.6,31.56,31.77,25.39,62.32,62,103.63,73,40.44,10.79,81.35-6.69,119.13-24.28s75.16-39,116.92-43.05c59.73-5.85,113.28,22.88,168.9,38.84,30.2,8.66,59,6.17,87.09-7.5,22.43-10.89,48-26.93,60.65-49.24V0Z" opacity=".5" fill="%235B86E5"/><path d="M0,0V5.63C149.93,59,314.09,71.32,475.83,42.57c43-7.64,84.23-20.12,127.61-26.46,59-8.63,112.48,12.24,165.56,35.4C827.93,77.22,886,95.24,951.2,90c86.53-7,172.46-45.71,248.8-84.81V0Z" fill="%235B86E5"/></svg>'); background-repeat: repeat-x; animation: wave 10s linear infinite; } @keyframes wave { 0% { transform: translateX(0); } 100% { transform: translateX(-50%); } } /* Pulse animation for the button */ @keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(255, 94, 98, 0.7); } 70% { box-shadow: 0 0 0 15px rgba(255, 94, 98, 0); } 100% { box-shadow: 0 0 0 0 rgba(255, 94, 98, 0); } } .pulse { animation: pulse 2s infinite; } </style> </head> <body> <div class="travel-container"> <div class="price-tag">From <span>$299</span> pp</div> <div class="decorative-element element-1"></div> <div class="decorative-element element-2"></div> <div class="destination-selector"> <h1>Escape to Paradise This Summer</h1> <p class="subtitle">Discover hidden beaches, azure waters, and sunset cocktails. Book now for 20% off our curated island escapes.</p> <div class="destination-options"> <div class="destination-option">Bali</div> <div class="destination-option">Maldives</div> <div class="destination-option">Santorini</div> <div class="destination-option">Tulum</div> <div class="destination-option">Fiji</div> </div> </div> <button class="booking-button"> Discover Your Escape <span class="booking-icon">→</span> </button> <div class="wave-container"> <div class="wave"></div> </div> </div> <script> document.addEventListener('DOMContentLoaded', function() { const destinationOptions = document.querySelectorAll('.destination-option'); const bookingButton = document.querySelector('.booking-button'); // Add click event to destination options destinationOptions.forEach(option => { option.addEventListener('click', function() { // Remove active class from all options destinationOptions.forEach(opt => opt.classList.remove('active')); // Add active class to clicked option this.classList.add('active'); // Update button text based on selection const destination = this.textContent; bookingButton.innerHTML = `Discover ${destination} <span class="booking-icon">→</span>`; // Add pulse animation bookingButton.classList.add('pulse'); setTimeout(() => { bookingButton.classList.remove('pulse'); }, 2000); }); }); // Button click event bookingButton.addEventListener('click', function() { // Create ripple effect const ripple = document.createElement('span'); ripple.style.position = 'absolute'; ripple.style.borderRadius = '50%'; ripple.style.backgroundColor = 'rgba(255, 255, 255, 0.3)'; ripple.style.transform = 'scale(0)'; ripple.style.animation = 'ripple 0.6s linear'; ripple.style.pointerEvents = 'none'; // Add keyframes for ripple animation const styleSheet = document.styleSheets[0]; styleSheet.insertRule(` @keyframes ripple { to { transform: scale(4); opacity: 0; } } `, styleSheet.cssRules.length); const rect = this.getBoundingClientRect(); const size = Math.max(rect.width, rect.height); ripple.style.width = ripple.style.height = `${size}px`; ripple.style.left = `${event.clientX - rect.left - size/2}px`; ripple.style.top = `${event.clientY - rect.top - size/2}px`; this.appendChild(ripple); setTimeout(() => { ripple.remove(); }, 600); // Show success message const currentText = this.innerHTML; this.innerHTML = 'Perfect Choice! <span class="booking-icon">✓</span>'; this.style.background = 'linear-gradient(135deg, #00C9FF 0%, #92FE9D 100%)'; setTimeout(() => { this.innerHTML = currentText; this.style.background = ''; }, 1500); }); }); </script> </body> </html>
<html> <head> <style> @import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@300;400;500;600&display=swap'); * { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Montserrat', sans-serif; } body { display: flex; justify-content: center; align-items: center; min-height: 100vh; background-color: #0c0c14; color: #fff; overflow: hidden; } .dashboard-container { width: 100%; max-width: 680px; padding: 20px; position: relative; } .dashboard-title { font-size: 24px; font-weight: 600; margin-bottom: 25px; color: #fff; position: relative; letter-spacing: 0.5px; } .dashboard-title:after { content: ''; position: absolute; left: 0; bottom: -10px; width: 60px; height: 3px; background: linear-gradient(90deg, #2c8fff, #00f2ff); } .button-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 20px; margin-bottom: 40px; } .event-button { position: relative; background: linear-gradient(145deg, #10101c, #171725); border: none; color: #ccd8ff; padding: 20px; border-radius: 12px; cursor: pointer; transition: all 0.3s ease; box-shadow: 5px 5px 15px rgba(0, 0, 0, 0.2), -5px -5px 15px rgba(30, 30, 50, 0.1); overflow: hidden; text-align: left; z-index: 1; display: flex; flex-direction: column; justify-content: space-between; height: 180px; } .event-button:hover { transform: translateY(-3px) scale(1.01); box-shadow: 0 10px 25px rgba(0, 150, 255, 0.2); } .event-button:active { transform: translateY(1px) scale(0.99); box-shadow: 0 5px 15px rgba(0, 150, 255, 0.15); } .event-button:before { content: ''; position: absolute; top: 0; left: 0; width: 4px; height: 100%; background: linear-gradient(to bottom, #2c8fff, #00f2ff); transition: width 0.3s ease; z-index: -1; border-radius: 12px 0 0 12px; } .event-button:hover:before { width: 100%; background: linear-gradient(145deg, rgba(44, 143, 255, 0.1), rgba(0, 242, 255, 0.1)); } .button-icon { font-size: 22px; margin-bottom: 10px; color: #2c8fff; transition: transform 0.3s ease; } .event-button:hover .button-icon { transform: translateY(-5px); color: #00f2ff; } .button-title { font-size: 16px; font-weight: 600; margin-bottom: 8px; transition: color 0.3s ease; } .event-button:hover .button-title { color: #ffffff; } .button-description { font-size: 12px; opacity: 0.7; line-height: 1.4; font-weight: 300; transition: opacity 0.3s ease; } .event-button:hover .button-description { opacity: 0.9; } .button-stat { display: flex; align-items: center; font-size: 12px; margin-top: 15px; color: #00f2ff; transition: transform 0.3s ease; } .event-button:hover .button-stat { transform: translateX(5px); } .button-stat i { margin-right: 5px; font-size: 12px; } .pulse-animation { position: absolute; top: 12px; right: 12px; width: 8px; height: 8px; border-radius: 50%; background-color: #00f2ff; box-shadow: 0 0 0 rgba(0, 242, 255, 0.4); animation: pulse 2s infinite; } @keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(0, 242, 255, 0.4); } 70% { box-shadow: 0 0 0 10px rgba(0, 242, 255, 0); } 100% { box-shadow: 0 0 0 0 rgba(0, 242, 255, 0); } } .live-events { padding: 20px; background: rgba(20, 20, 30, 0.6); border-radius: 12px; box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1); margin-bottom: 30px; } .live-events-title { font-size: 18px; font-weight: 500; margin-bottom: 15px; display: flex; align-items: center; } .live-dot { display: inline-block; width: 8px; height: 8px; background-color: #ff3366; border-radius: 50%; margin-right: 8px; animation: livePulse 1.5s infinite; } @keyframes livePulse { 0% { transform: scale(1); opacity: 1; } 50% { transform: scale(1.2); opacity: 0.7; } 100% { transform: scale(1); opacity: 1; } } .shimmer-effect { position: absolute; top: 0; left: -100%; width: 100%; height: 100%; background: linear-gradient( 90deg, transparent, rgba(255, 255, 255, 0.05), transparent ); animation: none; pointer-events: none; } .event-button:hover .shimmer-effect { animation: shimmer 1.5s infinite; } @keyframes shimmer { 0% { left: -100%; } 100% { left: 100%; } } @media (max-width: 600px) { .button-grid { grid-template-columns: 1fr; } .dashboard-title { font-size: 20px; } .event-button { height: 160px; padding: 15px; } } </style> <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0-beta3/css/all.min.css"> </head> <body> <div class="dashboard-container"> <h1 class="dashboard-title">Nexus Event Manager</h1> <div class="live-events"> <div class="live-events-title"> <span class="live-dot"></span> Currently Active Events: 3 </div> </div> <div class="button-grid"> <button class="event-button" id="createEventBtn"> <div class="shimmer-effect"></div> <div> <i class="fas fa-calendar-plus button-icon"></i> <div class="button-title">Create Event</div> <div class="button-description">Schedule and configure new events with advanced parameters</div> </div> <div class="button-stat"> <i class="fas fa-bolt"></i> Instant setup </div> </button> <button class="event-button"> <div class="shimmer-effect"></div> <div class="pulse-animation"></div> <div> <i class="fas fa-chart-line button-icon"></i> <div class="button-title">Analytics</div> <div class="button-description">Real-time metrics and attendance data visualization</div> </div> <div class="button-stat"> <i class="fas fa-sync"></i> Last updated 4m ago </div> </button> <button class="event-button"> <div class="shimmer-effect"></div> <div> <i class="fas fa-user-friends button-icon"></i> <div class="button-title">Attendees</div> <div class="button-description">Manage registrations and participant engagement</div> </div> <div class="button-stat"> <i class="fas fa-users"></i> 247 active users </div> </button> <button class="event-button"> <div class="shimmer-effect"></div> <div> <i class="fas fa-cog button-icon"></i> <div class="button-title">Settings</div> <div class="button-description">Configure notification rules and system preferences</div> </div> <div class="button-stat"> <i class="fas fa-clock"></i> Updated 2d ago </div> </button> </div> </div> <script> document.addEventListener('DOMContentLoaded', function() { // Add click effects const buttons = document.querySelectorAll('.event-button'); buttons.forEach(button => { button.addEventListener('click', function(e) { // Create ripple effect const ripple = document.createElement('div'); ripple.classList.add('ripple'); ripple.style.position = 'absolute'; ripple.style.borderRadius = '50%'; ripple.style.transform = 'scale(0)'; ripple.style.background = 'rgba(255, 255, 255, 0.2)'; ripple.style.pointerEvents = 'none'; // Position the ripple where clicked const rect = button.getBoundingClientRect(); const size = Math.max(rect.width, rect.height) * 2; ripple.style.width = size + 'px'; ripple.style.height = size + 'px'; ripple.style.left = (e.clientX - rect.left - size/2) + 'px'; ripple.style.top = (e.clientY - rect.top - size/2) + 'px'; button.appendChild(ripple); // Animate the ripple ripple.style.transition = 'transform 0.5s ease-out, opacity 0.5s ease-out'; ripple.style.transform = 'scale(1)'; ripple.style.opacity = '0'; // Remove the ripple after animation setTimeout(() => { ripple.remove(); }, 500); // If it's the create event button, show toast notification if (this.id === 'createEventBtn') { showToast('Event creation wizard opened'); } }); }); // Toast notification function function showToast(message) { const toast = document.createElement('div'); toast.textContent = message; toast.style.position = 'fixed'; toast.style.bottom = '20px'; toast.style.left = '50%'; toast.style.transform = 'translateX(-50%)'; toast.style.background = 'rgba(44, 143, 255, 0.9)'; toast.style.color = 'white'; toast.style.padding = '12px 20px'; toast.style.borderRadius = '8px'; toast.style.boxShadow = '0 4px 12px rgba(0, 0, 0, 0.15)'; toast.style.zIndex = '1000'; toast.style.opacity = '0'; toast.style.transition = 'opacity 0.3s ease'; document.body.appendChild(toast); setTimeout(() => { toast.style.opacity = '1'; }, 10); setTimeout(() => { toast.style.opacity = '0'; setTimeout(() => { toast.remove(); }, 300); }, 3000); } }); </script> </body> </html>
<html> <head> <style> @import url('https://fonts.googleapis.com/css2?family=Orbitron:wght@400;700&display=swap'); * { margin: 0; padding: 0; box-sizing: border-box; } body { background-color: #0a0a14; display: flex; flex-direction: column; justify-content: center; align-items: center; height: 100vh; font-family: 'Orbitron', sans-serif; overflow: hidden; color: #fff; } .container { width: 100%; max-width: 600px; text-align: center; position: relative; } h1 { font-size: 2.5rem; margin-bottom: 2rem; background: linear-gradient(to right, #ff00cc, #3300ff); -webkit-background-clip: text; background-clip: text; color: transparent; text-transform: uppercase; letter-spacing: 3px; text-shadow: 0 0 10px rgba(255, 0, 204, 0.3); } .featured-section { margin-bottom: 2rem; font-size: 1rem; color: #a0a0c0; line-height: 1.5; } .button-container { position: relative; z-index: 1; } .neo-button { position: relative; display: inline-block; padding: 15px 40px; font-family: 'Orbitron', sans-serif; font-size: 1.2rem; font-weight: 700; text-transform: uppercase; letter-spacing: 2px; background-color: #13131f; color: #fff; border: none; cursor: pointer; clip-path: polygon(10px 0, 100% 0, calc(100% - 10px) 100%, 0 100%); transition: all 0.3s ease; outline: none; box-shadow: 0 0 20px rgba(0, 255, 255, 0.2); } .neo-button::before { content: ''; position: absolute; top: 2px; left: 2px; right: 2px; bottom: 2px; background-color: #0c0c17; z-index: -1; clip-path: polygon(10px 0, 100% 0, calc(100% - 10px) 100%, 0 100%); } .neo-button::after { content: ''; position: absolute; top: 0; left: 0; right: 0; bottom: 0; background: linear-gradient(45deg, #00ffcc, #0033ff); z-index: -2; clip-path: polygon(10px 0, 100% 0, calc(100% - 10px) 100%, 0 100%); } .button-glow { position: absolute; width: 100%; height: 100%; top: 0; left: 0; background: radial-gradient(circle at center, rgba(0, 255, 255, 0.8), transparent 70%); opacity: 0; transition: opacity 0.5s ease; z-index: -1; transform: scale(1.5); } .neo-button:hover { transform: translateY(-2px); text-shadow: 0 0 10px rgba(0, 255, 255, 1); } .neo-button:hover .button-glow { opacity: 0.2; } .neo-button:active { transform: translateY(1px); } .neo-button .trail { position: absolute; width: 10px; height: 10px; border-radius: 50%; background: #00ffcc; opacity: 0; pointer-events: none; } .grid-background { position: absolute; top: 0; left: 0; width: 100%; height: 100%; background-image: linear-gradient(rgba(0, 33, 66, 0.1) 1px, transparent 1px), linear-gradient(90deg, rgba(0, 33, 66, 0.1) 1px, transparent 1px); background-size: 20px 20px; z-index: -3; } .game-categories { display: flex; justify-content: center; margin-top: 2.5rem; flex-wrap: wrap; } .category { margin: 0 10px; padding: 8px 15px; background-color: rgba(0, 255, 255, 0.1); border: 1px solid rgba(0, 255, 255, 0.3); border-radius: 4px; font-size: 0.8rem; cursor: pointer; transition: all 0.3s ease; } .category:hover { background-color: rgba(0, 255, 255, 0.2); transform: translateY(-2px); } @media (max-width: 600px) { h1 { font-size: 1.8rem; } .neo-button { padding: 12px 30px; font-size: 1rem; } .featured-section { font-size: 0.9rem; padding: 0 15px; } .game-categories { margin-top: 1.5rem; } .category { margin: 5px; font-size: 0.7rem; } } </style> </head> <body> <div class="grid-background"></div> <div class="container"> <h1>NexusGaming</h1> <div class="featured-section"> <p>Launching the Season 4 Championship Tournament</p> <p>10,000+ players • $50K prize pool • Live streaming</p> </div> <div class="button-container"> <button class="neo-button"> Join The Battle <div class="button-glow"></div> </button> </div> <div class="game-categories"> <div class="category">RPG</div> <div class="category">FPS</div> <div class="category">Strategy</div> <div class="category">Esports</div> <div class="category">VR</div> </div> </div> <script> const button = document.querySelector('.neo-button'); // Pulse animation function startPulse() { let opacity = 0; let increasing = true; const pulse = setInterval(() => { if (increasing) { opacity += 0.05; if (opacity >= 1) { increasing = false; } } else { opacity -= 0.05; if (opacity <= 0) { increasing = true; } } button.style.boxShadow = `0 0 20px rgba(0, 255, 255, ${opacity})`; }, 50); return pulse; } // Light trail effect button.addEventListener('mousemove', (e) => { const trail = document.createElement('div'); trail.className = 'trail'; const rect = button.getBoundingClientRect(); const x = e.clientX - rect.left; const y = e.clientY - rect.top; trail.style.left = `${x}px`; trail.style.top = `${y}px`; button.appendChild(trail); // Animate and remove setTimeout(() => { trail.style.transform = 'scale(3)'; trail.style.opacity = '0.5'; setTimeout(() => { trail.remove(); }, 500); }, 10); }); // Button hover effects let pulseInterval; button.addEventListener('mouseenter', () => { pulseInterval = startPulse(); // Create glitchy text effect const text = button.textContent.trim(); button.innerHTML = ''; for (let i = 0; i < text.length; i++) { const span = document.createElement('span'); span.textContent = text[i]; span.style.display = 'inline-block'; span.style.transition = 'transform 0.1s ease'; // Random animation delay setTimeout(() => { span.style.transform = 'translateY(-2px)'; setTimeout(() => { span.style.transform = 'translateY(0)'; }, 100); }, i * 30); button.appendChild(span); } // Add button glow back const glow = document.createElement('div'); glow.className = 'button-glow'; button.appendChild(glow); }); button.addEventListener('mouseleave', () => { clearInterval(pulseInterval); button.style.boxShadow = '0 0 20px rgba(0, 255, 255, 0.2)'; button.innerHTML = 'Join The Battle<div class="button-glow"></div>'; }); // Add click effect button.addEventListener('click', (e) => { // Create ripple effect const ripple = document.createElement('div'); ripple.className = 'trail'; const rect = button.getBoundingClientRect(); const x = e.clientX - rect.left; const y = e.clientY - rect.top; ripple.style.left = `${x}px`; ripple.style.top = `${y}px`; ripple.style.opacity = '0.8'; ripple.style.background = 'radial-gradient(circle, #00ffcc, transparent)'; button.appendChild(ripple); gsap.to(ripple, { scale: 15, opacity: 0, duration: 0.8, onComplete: () => { ripple.remove(); } }); // Shake effect let count = 0; const shakeInterval = setInterval(() => { const xOffset = Math.random() * 6 - 3; const yOffset = Math.random() * 6 - 3; button.style.transform = `translate(${xOffset}px, ${yOffset}px)`; count++; if (count > 10) { clearInterval(shakeInterval); button.style.transform = ''; } }, 30); console.log("Button clicked - Join The Battle!"); }); // Fallback for gsap if not available if (typeof gsap === 'undefined') { window.gsap = { to: (element, options) => { element.style.transform = `scale(${options.scale})`; element.style.opacity = options.opacity; setTimeout(() => { if (options.onComplete) options.onComplete(); }, options.duration * 1000); } }; } </script> </body> </html>
<html> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <style> * { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; } body { background-color: #f5f2ef; display: flex; justify-content: center; align-items: center; height: 700px; width: 700px; overflow: hidden; } .container { width: 90%; max-width: 640px; padding: 40px; background-color: #fff; border-radius: 12px; box-shadow: 0 15px 35px rgba(158, 142, 130, 0.2); position: relative; overflow: hidden; } .container:before { content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 6px; background: linear-gradient(90deg, #e4a975, #d78e5f, #e4a975); background-size: 200% 200%; animation: gradientShift 8s ease infinite; } @keyframes gradientShift { 0% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } 100% { background-position: 0% 50%; } } h1 { font-size: 28px; color: #3d3936; margin-bottom: 24px; font-weight: 600; position: relative; } p.tagline { font-size: 16px; color: #6f665e; margin-bottom: 36px; line-height: 1.5; } .search-container { display: flex; flex-direction: column; gap: 24px; margin-bottom: 30px; } .input-group { position: relative; } .input-group input, .input-group select { width: 100%; padding: 16px 14px; border: 1px solid #e0dbd5; border-radius: 6px; background-color: #fafafa; color: #423d39; font-size: 15px; transition: all 0.3s ease; } .input-group input:focus, .input-group select:focus { outline: none; border-color: #d78e5f; background-color: #fff; box-shadow: 0 0 0 3px rgba(215, 142, 95, 0.1); } .input-group label { position: absolute; left: 14px; top: -10px; background-color: #fff; padding: 0 6px; font-size: 13px; color: #776f68; z-index: 1; } .filters { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 30px; } .filter-pill { background-color: #f5f2ef; color: #6f665e; padding: 8px 16px; border-radius: 20px; font-size: 14px; cursor: pointer; transition: all 0.25s ease; border: 1px solid transparent; user-select: none; } .filter-pill:hover { background-color: #ebe7e2; } .filter-pill.active { background-color: #f3e9e0; color: #d78e5f; border-color: #e4a975; } .search-button { display: flex; align-items: center; justify-content: center; width: 100%; background-color: #f0f0f0; color: #3d3936; font-weight: 600; font-size: 16px; border: none; border-radius: 6px; padding: 16px 0; cursor: pointer; transition: all 0.3s ease; position: relative; overflow: hidden; border: 1px solid #e0dbd5; } .search-button .backdrop { position: absolute; bottom: 0; left: 0; width: 100%; height: 0; background-color: #d78e5f; transition: height 0.35s cubic-bezier(0.165, 0.84, 0.44, 1); z-index: 0; } .search-button:hover .backdrop { height: 100%; } .search-button span { position: relative; z-index: 1; transition: color 0.35s ease; display: flex; align-items: center; gap: 8px; } .search-button:hover span { color: #fff; } .search-button svg { width: 18px; height: 18px; transition: transform 0.35s ease; } .search-button:hover svg { transform: translateX(4px); } .search-button:hover svg path { fill: #fff; } .search-button:active { transform: scale(0.98); } .result-preview { margin-top: 30px; height: 0; overflow: hidden; transition: height 0.5s ease; } .result-preview.visible { height: 110px; border-top: 1px solid #e0dbd5; padding-top: 20px; } .properties-found { font-size: 14px; color: #6f665e; margin-bottom: 15px; } .properties-found strong { color: #d78e5f; } .result-item { display: flex; gap: 15px; align-items: center; background-color: #f9f7f5; padding: 12px; border-radius: 8px; transition: all 0.3s ease; } .result-item:hover { background-color: #f3e9e0; transform: translateY(-2px); } .result-thumb { width: 70px; height: 70px; border-radius: 6px; object-fit: cover; background-color: #e0dbd5; flex-shrink: 0; } .result-info { flex: 1; } .result-info h3 { font-size: 16px; color: #3d3936; margin-bottom: 4px; font-weight: 600; } .result-info p { font-size: 14px; color: #6f665e; margin-bottom: 6px; } .result-price { font-size: 16px; color: #d78e5f; font-weight: 600; } @media (max-width: 600px) { .container { padding: 30px 20px; width: 95%; } h1 { font-size: 24px; } .filters { gap: 8px; } .filter-pill { font-size: 13px; padding: 6px 12px; } } </style> </head> <body> <div class="container"> <h1>Find your sanctuary</h1> <p class="tagline">Search through verified listings with our reliable property finder, powered by local market insights.</p> <div class="search-container"> <div class="input-group"> <label>Location</label> <input type="text" placeholder="Enter city, neighborhood, or ZIP" id="location-input"> </div> <div class="input-group"> <label>Property Type</label> <select id="property-type"> <option value="" disabled selected>Select property type</option> <option value="apartment">Apartment</option> <option value="house">House</option> <option value="condo">Condo</option> <option value="townhouse">Townhouse</option> <option value="land">Land</option> </select> </div> </div> <div class="filters"> <div class="filter-pill" data-filter="price">Price Range</div> <div class="filter-pill" data-filter="beds">Bedrooms</div> <div class="filter-pill" data-filter="baths">Bathrooms</div> <div class="filter-pill" data-filter="sqft">Square Feet</div> <div class="filter-pill" data-filter="features">Features</div> </div> <button class="search-button" id="search-btn"> <div class="backdrop"></div> <span> Find Properties <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"> <path fill="#3d3936" d="M9.5,17.879l1.414,1.414l7.07-7.071l-7.07-7.071L9.5,6.565l5.657,5.657L9.5,17.879z"/> </svg> </span> </button> <div class="result-preview" id="result-preview"> <p class="properties-found">Found <strong>27 properties</strong> matching your criteria</p> <div class="result-item"> <img src="data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='70' height='70' viewBox='0 0 70 70'%3E%3Crect width='70' height='70' fill='%23e0dbd5'/%3E%3Cpath d='M35,25 L50,39 L50,55 L20,55 L20,39 L35,25 Z' fill='%23d0cbc5'/%3E%3Crect x='30' y='45' width='10' height='10' fill='%23c0bab5'/%3E%3Cpath d='M35,15 L55,35 L53,37 L35,20 L17,37 L15,35 L35,15 Z' fill='%23c0bab5'/%3E%3C/svg%3E" class="result-thumb" alt="Property thumbnail"> <div class="result-info"> <h3>Lakefront Modern Townhouse</h3> <p>Westlake Village, 2 beds, 2 baths</p> <div class="result-price">$495,000</div> </div> </div> </div> </div> <script> document.addEventListener('DOMContentLoaded', function() { const searchBtn = document.getElementById('search-btn'); const locationInput = document.getElementById('location-input'); const propertyType = document.getElementById('property-type'); const resultPreview = document.getElementById('result-preview'); const filterPills = document.querySelectorAll('.filter-pill'); // Add click event for filter pills filterPills.forEach(pill => { pill.addEventListener('click', function() { this.classList.toggle('active'); }); }); // Simulate search functionality searchBtn.addEventListener('click', function() { if (locationInput.value.trim() !== '' || propertyType.value !== '') { // Show result preview resultPreview.classList.add('visible'); // Add subtle feedback animation searchBtn.classList.add('active'); setTimeout(() => { searchBtn.classList.remove('active'); }, 300); } else { // Simple validation feedback locationInput.style.borderColor = '#e07c7c'; propertyType.style.borderColor = '#e07c7c'; setTimeout(() => { locationInput.style.borderColor = '#e0dbd5'; propertyType.style.borderColor = '#e0dbd5'; }, 1500); } }); // Clear validation on input locationInput.addEventListener('input', function() { this.style.borderColor = '#e0dbd5'; }); propertyType.addEventListener('change', function() { this.style.borderColor = '#e0dbd5'; }); // Make input keydown trigger search locationInput.addEventListener('keydown', function(e) { if (e.key === 'Enter') { searchBtn.click(); } }); }); </script> </body> </html>