Fixed: code desc & task desc
This commit is contained in:
parent
39fb7a648b
commit
12d814003e
2 changed files with 4 additions and 4 deletions
|
@ -2,12 +2,12 @@ importance: 5
|
|||
|
||||
---
|
||||
|
||||
# Animate the ball bouncing to the left
|
||||
# Animate the ball bouncing to the right
|
||||
|
||||
Make the ball bounce to the left. Like this:
|
||||
Make the ball bounce to the right. Like this:
|
||||
|
||||
[iframe height=250 src="solution"]
|
||||
|
||||
Write the animation code. The distance to the right is `100px`.
|
||||
Write the animation code. The distance to the left is `100px`.
|
||||
|
||||
Take the solution of the previous task <info:task/animate-ball> as the source.
|
||||
|
|
|
@ -100,7 +100,7 @@ The `callback` gets one argument -- the time passed from the beginning of the pa
|
|||
|
||||
Usually `callback` runs very soon, unless the CPU is overloaded or the laptop battery is almost discharged, or there's another reason.
|
||||
|
||||
The code below shows the time between first 20 runs for `requestAnimationFrame`. Usually it's 10-20ms:
|
||||
The code below shows the time between first 10 runs for `requestAnimationFrame`. Usually it's 10-20ms:
|
||||
|
||||
```html run height=40 refresh
|
||||
<script>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue