Calculator Tools Calculator Tools
Create

Barra de Progresso

Jan 5, 2024

About this app

App de Barra de Progresso de 1 Milhão até 10 Milhões com Números na Tela

Barra de Progresso Barra de Progresso

Related apps

Put this on your site

Source

                    <html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width,initial-scale=1">

<title>Barra de Progresso</title>
<meta name="description" content="App de Barra de Progresso de 1 Milhão até 10 Milhões com Números na Tela">
<meta name="keywords" content="barra de progresso, números, app">

<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.6.0/jquery.min.js"></script>
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.0.2/dist/css/bootstrap.min.css" rel="stylesheet"
integrity="sha384-EVSTQN3/azprG1Anm3QDgpJLIm9Nao0Yz1ztcQTwFspd3yD65VohhpuuCOmLASjC" crossorigin="anonymous">
<link href="https://stackpath.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css" rel="stylesheet">

<script type="text/javascript">
try {
document.addEventListener("DOMContentLoaded", function() {
// Start and end values for the progress bar
var startValue = 1000000;
var endValue = 10000000;

// Calculate the increment value for each update
var increment = (endValue - startValue) / 100;

// Get the progress bar element
var progressBar = document.getElementById("progress-bar");
var progressText = document.getElementById("progress-text");

// Update the progress bar every 100 milliseconds
var interval = setInterval(function() {
// Increase the start value by the increment
startValue += increment;

// Update the progress bar width and text
progressBar.style.width = (startValue / endValue * 100) + "%";
progressText.innerText = startValue.toLocaleString();

// Check if the end value has been reached
if (startValue >= endValue) {
clearInterval(interval);
}
}, 100);
});

} catch (error) {
throw error;
}
</script>

<style>
body {
background-color: #f8f9fa;
font-family: 'Roboto', sans-serif;
}

.container {
max-width: 400px;
margin: 50px auto;
padding: 20px;
background-color: #fff;
border-radius: 5px;
box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.progress {
height: 30px;
margin-bottom: 20px;
overflow: hidden;
background-color: #e9ecef;
border-radius: 5px;
}

.progress-bar {
height: 100%;
width: 0;
background-color: #007bff;
transition: width 0.3s ease;
}

.progress-text {
line-height: 30px;
text-align: center;
font-weight: bold;
color: #000;
}
</style>
</head>
<body>
<div id="main-container" class="container">
<h1>Barra de Progresso</h1>
<div class="progress">
<div id="progress-bar" class="progress-bar"></div>
</div>
<p id="progress-text"></p>
</div>
</body>
</html>