Network Usage Meter - 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>Network Usage Meter</title> <style> body { font-family: 'Arial', sans-serif; display: flex; justify-content: center; align-items: center; height: 100vh; background: linear-gradient(to right, #56ccf2, #2f80ed); margin: 0; } .meter-container { width: 350px; padding: 20px; background: white; border-radius: 15px; box-shadow: 0 4px 10px rgba(0,0,0,0.1); text-align: center; position: relative; } .meter-title { font-size: 1.2em; margin-bottom: 10px; } .meter { width: 100%; height: 30px; background: #e0e0e0; border-radius: 15px; overflow: hidden; position: relative; } .meter span { display: block; height: 100%; background: linear-gradient(to right, #6a11cb, #2575fc); border-radius: 15px 0 0 15px; width: 0; animation: fill 4s ease-in-out forwards; } @keyframes fill { 0% { width: 0; } 100% { width: 45%; } /* Adjust this percentage based on your needs */ } .percentage { font-size: 1.2em; margin-top: 10px; color: #6a11cb; } </style> </head> <body> <div class="meter-container"> <div class="meter-title">Network Usage</div> <div class="meter"> <span></span> </div> <div class="percentage">45%</div> </div> <script> document.addEventListener('DOMContentLoaded', () => { const meter = document.querySelector('.meter span'); const percentage = document.querySelector('.percentage'); let targetPercentage = 45; // Change this value to dynamically set the percentage meter.style.width = `${targetPercentage}%`; percentage.textContent = `${targetPercentage}%`; }); </script> </body> </html>