Futuristic Minimalism Code Block - 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>Futuristic Minimalism Code Block</title> <style> body { font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; background: linear-gradient(135deg, #1e5799, #2989d8, #7db9e8); display: flex; justify-content: center; align-items: center; height: 100vh; margin: 0; color: white; } .code-block { position: relative; width: 90%; max-width: 600px; background: #1a1a1a; border-radius: 10px; overflow: hidden; box-shadow: 0 8px 20px rgba(0, 0, 0, 0.5); transition: transform 0.3s ease, box-shadow 0.3s ease; } .code-block:hover { transform: translateY(-10px); box-shadow: 0 8px 20px rgba(255, 215, 0, 0.5); } .code-header { display: flex; align-items: center; padding: 10px 15px; background: #141414; border-bottom: 2px solid #ffd700; } .code-header .icons i { margin-right: 10px; color: #ffd700; font-size: 18px; } .code-header .copy-btn { background: #ffd700; border: none; color: black; padding: 5px 10px; cursor: pointer; border-radius: 5px; font-size: 14px; } .code-header .copy-btn:hover { background: #ffc400; } .code-content { padding: 20px; position: relative; } .code-content pre { margin: 0; color: #dcdcdc; font-size: 14px; line-height: 1.5; font-family: 'Courier New', Courier, monospace; } .code-content pre .keyword { color: #00ffff; } .code-content pre .string { color: #00ff00; } .code-content pre .comment { color: #808080; font-style: italic; } .code-content::after { content: '🚀'; position: absolute; top: -30px; right: -30px; font-size: 60px; color: rgba(255, 215, 0, 0.1); transform: rotate(-15deg); } </style> </head> <body> <div class="code-block"> <div class="code-header"> <div class="icons"> <i class="fas fa-circle"></i> <i class="fas fa-circle"></i> <i class="fas fa-circle"></i> </div> <button type="button" class="copy-btn" onclick="copyCode()">Copy</button> </div> <div class="code-content"> <pre><span class="comment">// Futuristic Minimalism Example</span> <span class="keyword">function</span> <span class="string">futuristicMinimalism</span>() { <span class="keyword">console</span>.<span class="string">log</span>(<span class="string">'Futuristic Minimalism Activated!'</span>); }</pre> </div> </div> <script src="https://kit.fontawesome.com/a076d05399.js"></script> <script> function copyCode() { const codeContent = document.querySelector('.code-content pre').innerText; navigator.clipboard.writeText(codeContent).then(() => { alert('Code copied to clipboard! 🚀'); }).catch(err => { alert('Failed to copy code: ', err); }); } </script> </body> </html>