Search
 
SCRIPT & CODE EXAMPLE
 

JAVASCRIPT

progressbar javascript

// index.html
<body>
<div class="myProgress"></div>
<div class="myBar"></div>
<br />
<button onclick="move()">Click me</button>
</body>
// style.css
.myProgress {
  width: 100 %;
  background - color: grey;
}
.myBar {
  width: 100 %;
  height: 30px;
  background - color: #04aa6d;
}

#play - animation {
  animation: progress - animation 5s forwards;
}

@keyframes progress - animation {
  0 % {
    width: 0 %;
  }
  100 % {
    width: 100 %;
  }
}

// logic.js
const move = () => {
  const progressBar = document.querySelector(".myBar")
  progressBar.setAttribute('id', 'play-animation')
}
Comment

PREVIOUS NEXT
Code Example
Javascript :: search array for property js 
Javascript :: jquery change label content 
Javascript :: review rating design 
Javascript :: how to disable option after select using jquery 
Javascript :: react date range picker 
Javascript :: divide symbol to string in javascript 
Javascript :: how to sent react from data in mongodb 
Javascript :: add a class in react 
Javascript :: jquery find element 
Javascript :: blockchain javascript 
Javascript :: adding parameters to url react router 
Javascript :: History push for redirecting to another page in react-router v6 
Javascript :: mdn .map 
Javascript :: nodelist to array 
Javascript :: how to debug node js file in webpack 
Javascript :: jsonwebtoken 
Javascript :: oops in js 
Javascript :: airbnb and eslint react native 
Javascript :: Get Value of JSON As Array 
Javascript :: pluralize javascript 
Javascript :: javascript document 
Javascript :: new date javascript 
Javascript :: width and height with node js 
Javascript :: array of 
Javascript :: calendar picker react js 
Javascript :: what is js 
Javascript :: You will need to rewrite or cast the expression. 
Javascript :: ternary javascript 
Javascript :: dynamic routing 
Javascript :: slice in js 
ADD CONTENT
Topic
Content
Source link
Name
7+7 =