-
Pure CSS Scoreboard widget
HTML
CSS
JavaScript
● LIVE
INDIA
180/4
18.2 Overs
VS
PAKISTAN
Target: 185
Recent:
4
1
W
6
0
2
VIRAT KOHLI REACHES 82* | NEED 5 RUNS FROM 10 BALLS | HARDIK PANDYA ON 40* | STADIUM ATMOSPHERE IS ELECTRIFYING!
:root { --ind-blue: #00529b; --pak-green: #01411c; --gold: #f39c12; --glass: rgba(255, 255, 255, 0.05); } body { background: radial-gradient(circle, #2c3e50, #000000); color: white; font-family: 'Inter', sans-serif; display: flex; justify-content: center; align-items: center; height: 100vh; } .match-card { background: rgba(30, 30, 30, 0.8); backdrop-filter: blur(15px); width: 600px; border: 1px solid rgba(255,255,255,0.1); border-radius: 24px; padding: 20px; box-shadow: 0 25px 50px rgba(0,0,0,0.8); position: relative; } /* Floating Live Tag */ .live-indicator { position: absolute; top: -15px; left: 50%; transform: translateX(-50%); background: #e74c3c; padding: 5px 20px; border-radius: 50px; font-weight: 900; letter-spacing: 2px; font-size: 0.7rem; box-shadow: 0 0 15px #e74c3c; } .teams-container { display: flex; justify-content: space-between; align-items: center; padding: 40px 0; } .team { text-align: center; flex: 1; } .flag-wrapper img { width: 90px; height: 60px; object-fit: cover; border-radius: 8px; box-shadow: 0 10px 20px rgba(0,0,0,0.4); border: 2px solid rgba(255,255,255,0.1); } .team h2 { margin: 15px 0 5px; letter-spacing: 3px; font-size: 1.2rem; } /* Scores */ .current-score { font-size: 2.2rem; font-weight: 800; color: var(--gold); } .overs { font-size: 1rem; color: #888; } /* VS Badge */ .vs-badge { background: linear-gradient(145deg, #333, #111); width: 50px; height: 50px; border-radius: 50%; display: flex; justify-content: center; align-items: center; font-weight: 900; border: 2px solid var(--gold); color: var(--gold); } /* Commentary Ticker */ .ticker-box { background: var(--ind-blue); margin: 10px 0; padding: 12px; border-radius: 10px; text-align: center; font-style: italic; font-weight: 600; border-left: 5px solid white; } /* Table Style */ .stats-grid { background: var(--glass); border-radius: 15px; overflow: hidden; } .stat-row { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr 1fr 1.5fr; padding: 12px 15px; border-bottom: 1px solid rgba(255,255,255,0.05); } .stat-row.header { color: #888; font-size: 0.75rem; text-transform: uppercase; } .stat-row.active { background: rgba(243, 156, 18, 0.1); color: var(--gold); } /* --- Animation Definitions --- */ @keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(231, 76, 60, 0.7); } 70% { box-shadow: 0 0 0 10px rgba(231, 76, 60, 0); } 100% { box-shadow: 0 0 0 0 rgba(231, 76, 60, 0); } } @keyframes slideInLeft { from { opacity: 0; transform: translateX(-50px); } to { opacity: 1; transform: translateX(0); } } @keyframes slideInRight { from { opacity: 0; transform: translateX(50px); } to { opacity: 1; transform: translateX(0); } } @keyframes scaleUp { from { transform: scale(0); } to { transform: scale(1); } } @keyframes ticker { 0% { transform: translateX(100%); } 100% { transform: translateX(-100%); } } @keyframes ballPop { 0% { transform: scale(0); opacity: 0; } 80% { transform: scale(1.2); } 100% { transform: scale(1); opacity: 1; } } /* --- Applying Animations --- */ .pulse { animation: pulse 2s infinite; } .slide-in-left { animation: slideInLeft 0.8s ease-out forwards; } .slide-in-right { animation: slideInRight 0.8s ease-out forwards; } .vs-badge { animation: scaleUp 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275) 0.4s both; } /* Recent Balls Section */ .recent-balls { display: flex; align-items: center; justify-content: center; gap: 10px; margin: 20px 0; } .ball { width: 30px; height: 30px; background: #444; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 0.8rem; font-weight: bold; animation: ballPop 0.4s ease-out both; } /* Staggered delay for balls */ .ball:nth-child(2) { animation-delay: 0.6s; } .ball:nth-child(3) { animation-delay: 0.7s; } .ball:nth-child(4) { animation-delay: 0.8s; } .ball:nth-child(5) { animation-delay: 0.9s; } .ball:nth-child(6) { animation-delay: 1.0s; } .ball:nth-child(7) { animation-delay: 1.1s; } .ball.four { background: #2ecc71; color: white; } .ball.six { background: #f1c40f; color: black; } .ball.wicket { background: #e74c3c; color: white; } /* Scrolling Ticker */ .ticker-wrap { width: 100%; overflow: hidden; background: rgba(0, 0, 0, 0.3); padding: 10px 0; border-radius: 8px; white-space: nowrap; } .ticker-move { display: inline-block; padding-left: 100%; animation: ticker 15s linear infinite; color: #f39c12; font-weight: bold; text-transform: uppercase; font-size: 0.85rem; }
Live Preview