Dark Theme Mobile Dummy - 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>Dark Theme Mobile Dummy</title> <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css" /> <script src="https://kit.fontawesome.com/f2c67a1c6b.js" crossorigin="anonymous"></script> <style> * { margin: 0; padding: 0; box-sizing: border-box; } body, html { padding: 5%; display: flex; justify-content: center; align-items: center; background: #222; font-family: 'Arial', sans-serif; background-attachment: fixed; } .mobile { width: 375px; height: 812px; background: #333; border-radius: 40px; box-shadow: 0 10px 20px rgba(0, 0, 0, 0.7); position: relative; overflow: hidden; display: flex; flex-direction: column; justify-content: space-between; padding: 20px; color: #fff; } .status-bar { display: flex; justify-content: space-between; align-items: center; padding: 10px; background: #111; color: #fff; font-size: 12px; border-top-left-radius: 10px; border-top-right-radius: 10px; } .status-bar div { display: flex; align-items: center; } .status-bar i { margin-right: 5px; } .battery { width: 24px; height: 12px; border: 2px solid #fff; position: relative; margin-left: 5px; } .battery::before { content: ''; position: absolute; top: 3px; right: -4px; width: 2px; height: 6px; background: #fff; } .battery .level { width: 16px; height: 8px; background: #fff; position: absolute; top: 1px; left: 1px; } .screen { flex-grow: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; background: #444; position: relative; } .time { font-size: 48px; font-weight: bold; } .search-bar { display: flex; align-items: center; background: #555; border-radius: 25px; padding: 10px; margin: 20px 0; width: 80%; } .search-bar input { border: none; outline: none; width: 100%; margin-left: 10px; font-size: 16px; background: transparent; color: #fff; } .apps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 15px; width: 100%; padding: 20px; } .app { display: flex; flex-direction: column; align-items: center; text-align: center; } .app i { font-size: 30px; margin-bottom: 5px; } .bottom-bar { display: flex; justify-content: space-around; align-items: center; padding: 10px; background: #111; color: #fff; border-bottom-left-radius: 20px; border-bottom-right-radius: 20px; } .bottom-bar i { font-size: 24px; } .home-button { width: 60px; height: 60px; background: #000; border-radius: 50%; position: absolute; bottom: 20px; left: 50%; transform: translateX(-50%); box-shadow: 0 5px 10px rgba(0, 0, 0, 0.3); } @keyframes battery-animation { 0% { width: 5%; } 100% { width: 100%; } } .battery.low .level { animation: battery-animation 2s infinite alternate; } </style> </head> <body> <div class="mobile"> <div class="status-bar"> <div> <i class="fas fa-signal"></i> <i class="fas fa-wifi"></i> </div> <div class="battery"> <div class="level"></div> </div> </div> <div class="screen"> <div class="time" id="time"></div> <div class="search-bar"> <i class="fas fa-search"></i> <input type="text" placeholder="Search..."> </div> <div class="apps"> <div class="app"> <i class="fas fa-phone" style="color: #28a745;"></i> <div>Phone</div> </div> <div class="app"> <i class="fas fa-envelope" style="color: #ffc107;"></i> <div>Email</div> </div> <div class="app"> <i class="fas fa-cog" style="color: #17a2b8;"></i> <div>Settings</div> </div> <div class="app"> <i class="fas fa-camera" style="color: #e83e8c;"></i> <div>Camera</div> </div> <div class="app"> <i class="fas fa-music" style="color: #007bff;"></i> <div>Music</div> </div> <div class="app"> <i class="fas fa-map-marker-alt" style="color: #dc3545;"></i> <div>Maps</div> </div> <div class="app"> <i class="fas fa-calendar-alt" style="color: #6f42c1;"></i> <div>Calendar</div> </div> <div class="app"> <i class="fas fa-clock" style="color: #fd7e14;"></i> <div>Clock</div> </div> </div> </div> <div class="bottom-bar"> <i class="fas fa-square"></i> <i class="fas fa-circle"></i> <i class="fas fa-chevron-right"></i> </div> </div> <script> function updateTime() { const timeElement = document.getElementById('time'); const now = new Date(); const hours = String(now.getHours()).padStart(2, '0'); const minutes = String(now.getMinutes()).padStart(2, '0'); const seconds = String(now.getSeconds()).padStart(2, '0'); timeElement.textContent = `${hours}:${minutes}:${seconds}`; } setInterval(updateTime, 1000); updateTime(); function updateBattery() { const batteryLevel = Math.floor(Math.random() * 101); const batteryElement = document.querySelector('.battery .level'); batteryElement.style.width = `${batteryLevel}%`; if (batteryLevel < 20) { document.querySelector('.battery').classList.add('low'); } else { document.querySelector('.battery').classList.remove('low'); } } setInterval(updateBattery, 10000); updateBattery(); </script> </body> </html>