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: content/tutorial/03-advanced-svelte/03-animations/01-animate/README.md
+7-7Lines changed: 7 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,11 +2,11 @@
2
2
title: The animate directive
3
3
---
4
4
5
-
In the [previous chapter](/tutorial/deferred-transitions), we used deferred transitions to create the illusion of motion as elements move from one todo list to the other.
First, import the `flip`function — flip stands for ['First, Last, Invert, Play'](https://aerotwist.com/blog/flip-your-animations/)— from `svelte/animate`into `TodoList.svelte`:
9
+
最初に、`TodoList.svelte` に `flip`関数(flip は ['First, Last, Invert, Play'](https://aerotwist.com/blog/flip-your-animations/)の略です)を `svelte/animate`からインポートします
10
10
11
11
```svelte
12
12
<script>
@@ -18,7 +18,7 @@ First, import the `flip` function — flip stands for ['First, Last, Invert, Pla
18
18
</script>
19
19
```
20
20
21
-
Then add it to the `<label>`elements:
21
+
次に、それを `<label>`要素に追加します。
22
22
23
23
```svelte
24
24
<label
@@ -28,7 +28,7 @@ Then add it to the `<label>` elements:
28
28
>
29
29
```
30
30
31
-
The movement is a little slow in this case, so we can add a `duration`parameter:
31
+
この場合、動きが少し遅いので、`duration`パラメータを追加することができます。
32
32
33
33
```svelte
34
34
<label
@@ -38,6 +38,6 @@ The movement is a little slow in this case, so we can add a `duration` parameter
38
38
>
39
39
```
40
40
41
-
> `duration`can also be a `d => milliseconds` function, where `d`is the number of pixels the element has to travel
Note that all the transitions and animations are being applied with CSS, rather than JavaScript, meaning they won't block (or be blocked by) the main thread.
0 commit comments