You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: 7-animation/3-js-animation/1-animate-ball/solution.md
+4-4Lines changed: 4 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,10 +1,10 @@
1
-
To bounce we can use CSS property `top`and`position:absolute`for the ball inside the field with`position:relative`.
1
+
Untuk membuatnya memantul kita bisa menggunakan properti CSS `top`dan`position:absolute`untuk bola yang berada didalam bidang dengan`position:relative`.
2
2
3
-
The bottom coordinate of the field is `field.clientHeight`. The CSS `top`property refers to the upper edge of the ball. So it should go from`0`till`field.clientHeight - ball.clientHeight`, that's the final lowest position of the upper edge of the ball.
3
+
Koordinat bawah dari bidangnya adalah `field.clientHeight`. Properti CSS `top`mengacu pada bagian atas dari bolanya. Jadi itu haruslah berasal dari`0`sampai`field.clientHeight - ball.clientHeight`, itulah yang menjadi posisi terbawah dari bagian atas bolanya.
4
4
5
-
To get the "bouncing" effect we can use the timing function `bounce`in `easeOut` mode.
5
+
Untuk mendapatkan efek "memantul" kita bisa menggunakan fungsi waktu `bounce`di mode `easeOut`.
0 commit comments