renames
This commit is contained in:
parent
787d58a83f
commit
455d300d8d
280 changed files with 2 additions and 2 deletions
36
3-animation/3-js-animation/width.view/index.html
Normal file
36
3-animation/3-js-animation/width.view/index.html
Normal file
|
@ -0,0 +1,36 @@
|
|||
<!DOCTYPE HTML>
|
||||
<html>
|
||||
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<style>
|
||||
progress {
|
||||
width: 5%;
|
||||
}
|
||||
</style>
|
||||
<script src="animate.js"></script>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
||||
|
||||
<progress id="elem"></progress>
|
||||
|
||||
<script>
|
||||
elem.onclick = function() {
|
||||
animate({
|
||||
duration: 1000,
|
||||
timing: function(timeFraction) {
|
||||
return timeFraction;
|
||||
},
|
||||
draw: function(progress) {
|
||||
elem.style.width = progress * 100 + '%';
|
||||
}
|
||||
});
|
||||
};
|
||||
</script>
|
||||
|
||||
|
||||
</body>
|
||||
|
||||
</html>
|
Loading…
Add table
Add a link
Reference in a new issue