-
Notifications
You must be signed in to change notification settings - Fork 31
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
CSS-animations
- Loading branch information
Showing
15 changed files
with
214 additions
and
192 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,17 @@ | ||
|
||
CSS to animate both `width` and `height`: | ||
CSS pentru a anima atât `width` cât și `height`: | ||
```css | ||
/* original class */ | ||
/* clasa originală */ | ||
|
||
#flyjet { | ||
transition: all 3s; | ||
} | ||
|
||
/* JS adds .growing */ | ||
/* JS adaugă .growing */ | ||
#flyjet.growing { | ||
width: 400px; | ||
height: 240px; | ||
} | ||
``` | ||
|
||
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. | ||
Vă rugăm să notați că `transitionend` se declanșează de două ori -- o dată pentru fiecare proprietate. Deci dacă nu efectuăm o verificare suplimentară atunci mesajul va apărea de 2 ori. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6 changes: 3 additions & 3 deletions
6
7-animation/2-css-animations/2-animate-logo-bezier-css/solution.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
We need to choose the right Bezier curve for that animation. It should have `y>1` somewhere for the plane to "jump out". | ||
Trebuie să alegem curba Bezier potrivită pentru acea animație. Aceasta ar trebui să aibă `y>1` undeva pentru ca avionul să "sară". | ||
|
||
For instance, we can take both control points with `y>1`, like: `cubic-bezier(0.25, 1.5, 0.75, 1.5)`. | ||
De exemplu, putem lua ambele puncte de control cu `y>1`, ca: `cubic-bezier(0.25, 1.5, 0.75, 1.5)`. | ||
|
||
The graph: | ||
Graficul: | ||
|
||
![](bezier-up.svg) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
16 changes: 8 additions & 8 deletions
16
7-animation/2-css-animations/4-animate-circle-callback/task.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,25 @@ | ||
|
||
# Animated circle with callback | ||
# Cerc animat cu callback | ||
|
||
In the task <info:task/animate-circle> an animated growing circle is shown. | ||
În sarcina <info:task/animate-circle> este afișat un cerc animat în creștere. | ||
|
||
Now let's say we need not just a circle, but to show a message inside it. The message should appear *after* the animation is complete (the circle is fully grown), otherwise it would look ugly. | ||
Acum să spunem că avem nevoie nu doar de un cerc, ci și de un mesaj în interiorul acestuia. Mesajul ar trebui să apară *după* finalizarea animației (cercul a crescut complet), altfel ar arăta urât. | ||
|
||
In the solution of the task, the function `showCircle(cx, cy, radius)` draws the circle, but gives no way to track when it's ready. | ||
În soluția sarcinii, funcția `showCircle(cx, cy, radius)` desenează cercul, dar nu oferă nicio modalitate de a urmări când este gata. | ||
|
||
Add a callback argument: `showCircle(cx, cy, radius, callback)` to be called when the animation is complete. The `callback` should receive the circle `<div>` as an argument. | ||
Adăugați un argument de callback: `showCircle(cx, cy, radius, callback)` care va fi apelată atunci când animația este finalizată. `callback`-ul trebuie să primească `<div>`-ul cercului ca argument. | ||
|
||
Here's the example: | ||
Iată exemplul: | ||
|
||
```js | ||
showCircle(150, 150, 100, div => { | ||
div.classList.add('message-ball'); | ||
div.append("Hello, world!"); | ||
div.append("Salut, lume!"); | ||
}); | ||
``` | ||
|
||
Demo: | ||
|
||
[iframe src="solution" height=260] | ||
|
||
Take the solution of the task <info:task/animate-circle> as the base. | ||
Luați ca bază soluția sarcinii <info:task/animate-circle>. |
Oops, something went wrong.