Skip to content

Commit 823336d

Browse files
tymon3568vnphanquang
authored andcommitted
docs:12-dịch-2-advanced-svelte-animate
1 parent 056a0fa commit 823336d

File tree

1 file changed

+8
-8
lines changed
  • content/tutorial/02-advanced-svelte/03-animations/01-animate

1 file changed

+8
-8
lines changed

content/tutorial/02-advanced-svelte/03-animations/01-animate/README.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
---
2-
title: The animate directive
2+
title: Chỉ thị animate
33
---
44

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.
5+
Trong [chương trước](/tutorial/deferred-transitions), chúng ta đã sử dụng các hiệu ứng chuyển tiếp trì hoãn để tạo hiệu ứng về chuyển động khi các phần tử di chuyển từ một danh sách công việc sang danh sách khác.
66

7-
To complete the illusion, we also need to apply motion to the elements that _aren't_ transitioning. For this, we use the `animate` directive.
7+
Để hoàn tất hiệu ứng, chúng ta cũng cần áp dụng chuyển động cho các phần tử _không_ tham gia chuyển tiếp. Để làm điều này, chúng ta sử dụng chỉ thị `animate`.
88

9-
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+
Đầu tiên, nhập hàm `flip` — flip viết tắt của ['First, Last, Invert, Play'](https://aerotwist.com/blog/flip-your-animations/)từ `svelte/animate` vào `TodoList.svelte`:
1010

1111
```svelte
1212
/// file: TodoList.svelte
@@ -19,7 +19,7 @@ First, import the `flip` function — flip stands for ['First, Last, Invert, Pla
1919
</script>
2020
```
2121

22-
Then add it to the `<li>` elements:
22+
Sau đó thêm nó vào các phần tử <li>:
2323

2424
```svelte
2525
/// file: TodoList.svelte
@@ -31,7 +31,7 @@ Then add it to the `<li>` elements:
3131
>
3232
```
3333

34-
The movement is a little slow in this case, so we can add a `duration` parameter:
34+
Chuyển động hơi chậm trong trường hợp này, nên chúng ta có thể thêm một tham số `duration`:
3535

3636
```svelte
3737
/// file: TodoList.svelte
@@ -43,6 +43,6 @@ The movement is a little slow in this case, so we can add a `duration` parameter
4343
>
4444
```
4545

46-
> `duration` can also be a `d => milliseconds` function, where `d` is the number of pixels the element has to travel
46+
> `duration` cũng có thể là một hàm `d => milliseconds`, trong đó `d` là số pixel mà phần tử phải di chuyển
4747
48-
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.
48+
Lưu ý rằng tất cả các hiệu ứng chuyển tiếp và chuyển động đều được áp dụng bằng CSS, chứ không phải JavaScript, có nghĩa là chúng sẽ không chặn (hoặc bị chặn bởi) luồng chính.

0 commit comments

Comments
 (0)