Skip to content

Commit 8c18fe3

Browse files
authored
Merge pull request #128 from mauehara/css-animations
CSS-animations
2 parents 2885a41 + 6c3307e commit 8c18fe3

File tree

13 files changed

+156
-156
lines changed

13 files changed

+156
-156
lines changed
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
11

2-
CSS to animate both `width` and `height`:
2+
CSS para animar ambos `width` e `height`:
33
```css
4-
/* original class */
4+
/* classe original */
55

66
#flyjet {
77
transition: all 3s;
88
}
99

10-
/* JS adds .growing */
10+
/* JS insere .growing */
1111
#flyjet.growing {
1212
width: 400px;
1313
height: 240px;
1414
}
1515
```
1616

17-
Please note that `transitionend` triggers two times -- once for every property. So if we don't perform an additional check then the message would show up 2 times.
17+
Por favor, note que `transitionend` é disparado duas vezes -- uma vez para cada propriedade. Então, se não perfomarmos uma verificação adicional, a mensagem será exibida 2 vezes.

7-animation/2-css-animations/1-animate-logo-css/solution.view/index.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
flyjet.addEventListener('transitionend', function() {
3535
if (!ended) {
3636
ended = true;
37-
alert('Done!');
37+
alert('Feito!');
3838
}
3939
});
4040

7-animation/2-css-animations/1-animate-logo-css/task.md

+6-6
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,13 @@ importance: 5
22

33
---
44

5-
# Animate a plane (CSS)
5+
# Anime um avião (CSS)
66

7-
Show the animation like on the picture below (click the plane):
7+
Mostre a animação como na imagem abaixo (clique no avião para ver):
88

99
[iframe src="solution" height=300]
1010

11-
- The picture grows on click from `40x24px` to `400x240px` (10 times larger).
12-
- The animation takes 3 seconds.
13-
- At the end output: "Done!".
14-
- During the animation process, there may be more clicks on the plane. They shouldn't "break" anything.
11+
- A imagem cresce após o clique de `40x24px` para `400x240px` (10 vezes maior).
12+
- A animação dura 3 segundos.
13+
- Ao final exibimos: "Feito!".
14+
- Durante a animação, talvez haja mais cliques no avião. Eles não devem "quebrar" nada.
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
We need to choose the right Bezier curve for that animation. It should have `y>1` somewhere for the plane to "jump out".
1+
Precisamos escolher a curva Bezier certa para essa animação. Ela deve ter `y>1` em algum lugar para que o avião *jump out* (pule fora).
22

3-
For instance, we can take both control points with `y>1`, like: `cubic-bezier(0.25, 1.5, 0.75, 1.5)`.
3+
Por exemplo, podemos configurar ambos os pontos de controle com `y>1`, como: `cubic-bezier(0.25, 1.5, 0.75, 1.5)`.
44

5-
The graph:
5+
O gráfico:
66

77
![](bezier-up.svg)

7-animation/2-css-animations/2-animate-logo-bezier-css/task.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,12 @@ importance: 5
22

33
---
44

5-
# Animate the flying plane (CSS)
5+
# Anime o avião voador (CSS)
66

7-
Modify the solution of the previous task <info:task/animate-logo-css> to make the plane grow more than it's original size 400x240px (jump out), and then return to that size.
7+
Modifique a tarefa anterior <info:task/animate-logo-css> para fazer com que o avião cresça mais que seu tamanho original 400x240px (*jump out*), e depois retornar ao tamanho original.
88

9-
Here's how it should look (click on the plane):
9+
Ele deve se comportar assim (clique no avião para ver):
1010

1111
[iframe src="solution" height=350]
1212

13-
Take the solution of the previous task as the source.
13+
Use a solução da tarefa anterior como fonte.

7-animation/2-css-animations/3-animate-circle/task.md

+6-6
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,15 @@ importance: 5
22

33
---
44

5-
# Animated circle
5+
# Círculo animado
66

7-
Create a function `showCircle(cx, cy, radius)` that shows an animated growing circle.
7+
Crie uma função `showCircle(cx, cy, radius)` que mostre um círculo animado crescendo.
88

9-
- `cx,cy` are window-relative coordinates of the center of the circle,
10-
- `radius` is the radius of the circle.
9+
- `cx,cy` são coordenadas do centro do círculo relativas à janela do navegador,
10+
- `radius` é o raio do círculo.
1111

12-
Click the button below to see how it should look like:
12+
Clique no botão abaixo para ver como a animação se comporta:
1313

1414
[iframe src="solution" height=260]
1515

16-
The source document has an example of a circle with right styles, so the task is precisely to do the animation right.
16+
A fonte do documento possui um exemplo de um círculo com os estilos certos, a tarefa é justamente fazer a animação corretamente.

0 commit comments

Comments
 (0)