Toggle navigation
☰
HTML
CSS
Scripting
Database
<!doctype html> <title>Example</title> <style> body { display: flex; justify-content: center; align-items: center; height: 100vh; margin: 0; font-family: sans-serif; background-color: #1a1a2e; background-image: radial-gradient(circle at 15% 50%, rgba(20, 30, 70, 0.4), transparent 25%), radial-gradient(circle at 85% 30%, rgba(30, 10, 50, 0.4), transparent 25%); } .glass-card { position: relative; width: 300px; height: 400px; background: rgba(255, 255, 255, 0.05); border-radius: 15px; border: 1px solid rgba(255, 255, 255, 0.1); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); overflow: hidden; color: white; display: flex; flex-direction: column; justify-content: center; align-items: center; box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37); } /* The Shimmer Effect */ .glass-card::before { content: ''; position: absolute; top: 0; left: -100%; /* Start entirely off-card to the left */ width: 50%; height: 100%; /* A skewed, semi-transparent white gradient passing over */ background: linear-gradient( to right, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.2) 50%, rgba(255, 255, 255, 0) 100% ); transform: skewX(-20deg); animation: shimmer 3s infinite linear; } @keyframes shimmer { 100% { left: 200%; /* Move completely across and off-card to the right */ } } @media (prefers-reduced-motion: reduce) { .glass-card::before { display: none; /* Completely removes the moving shimmer */ } } </style> <div class="glass-card"> <h2>Pro Plan</h2> <p>$19.99 / mo</p> <button style="padding: 10px 20px; border-radius: 20px; border: none; font-weight: bold; margin-top: 20px; cursor: pointer;">Upgrade</button> </div>