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/2-css-animations/article.md
+26-26Lines changed: 26 additions & 26 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -266,29 +266,29 @@ Dar cum facem o curbă Bezier pentru o anumită sarcină? Există multe instrume
266
266
267
267
### Steps
268
268
269
-
The timing function `steps(number of steps[, start/end])`allows splitting an transition into multiple steps.
269
+
Timing function `steps(număr de pași[, start/end])`permite împărțirea unei tranziții în mai mulți pași.
270
270
271
-
Let's see that in an example with digits.
271
+
Să vedem acest lucru într-un exemplu cu cifre.
272
272
273
-
Here's a list of digits, without any animations, just as a source:
273
+
Iată o listă de cifre, fără nicio animație, doar ca sursă:
274
274
275
275
[codetabs src="step-list"]
276
276
277
-
In the HTML, a stripe of digits is enclosed into a fixed-length`<div id="digits">`:
277
+
În HTML, o bandă de cifre este înglobată într-un`<div id="digits">` de lungime fixă:
278
278
279
279
```html
280
280
<divid="digit">
281
281
<divid="stripe">0123456789</div>
282
282
</div>
283
283
```
284
284
285
-
The`#digit`div has a fixed width and a border, so it looks like a red window.
285
+
Div-ul`#digit`are o lățime fixă și o margine, astfel încât arată ca o fereastră roșie.
286
286
287
-
We'll make a timer: the digits will appear one by one, in a discrete way.
287
+
Vom face un cronometru: cifrele vor apărea una câte una, într-un mod discret.
288
288
289
-
To achieve that, we'll hide the `#stripe`outside of `#digit`using`overflow: hidden`, and then shift the `#stripe`to the left step-by-step.
289
+
Pentru a realiza asta, vom ascunde `#stripe`în afara lui `#digit`folosind`overflow: hidden`, apoi vom deplasa `#stripe`spre stânga pas cu pas.
290
290
291
-
There will be 9 steps, a step-move for each digit:
291
+
Vor fi 9 pași, câte un pas de deplasare pentru fiecare cifră:
292
292
293
293
```css
294
294
#stripe.animate {
@@ -297,48 +297,48 @@ There will be 9 steps, a step-move for each digit:
297
297
}
298
298
```
299
299
300
-
The first argument of`steps(9, start)`is the number of steps. The transform will be split into 9 parts (10% each). The time interval is automatically divided into 9 parts as well, so `transition: 9s`gives us 9 seconds for the whole animation – 1 second per digit.
300
+
Primul argument din`steps(9, start)`este numărul de pași. Transform va fi împărțit în 9 părți (10% fiecare). Intervalul de timp este împărțit automat în 9 părți de asemenea, așa că `transition: 9s`ne oferă 9 secunde pentru întreaga animație – 1 secundă pentru fiecare cifră.
301
301
302
-
The second argument is one of two words: `start`or`end`.
302
+
Al doilea argument este unul dintre cele două cuvinte: `start`sau`end`.
303
303
304
-
The `start`means that in the beginning of animation we need to make the first step immediately.
304
+
`start`înseamnă că la începutul animației trebuie să facem imediat primul pas.
305
305
306
-
In action:
306
+
În acțiune:
307
307
308
308
[codetabs src="step"]
309
309
310
-
A click on the digit changes it to`1` (the first step) immediately, and then changes in the beginning of the next second.
310
+
Un clic pe cifră o schimbă imediat în`1` (primul pas), iar apoi se schimbă la începutul secundei următoare.
311
311
312
-
The process is progressing like this:
312
+
Procesul evoluează astfel:
313
313
314
-
-`0s` -- `-10%` (first change in the beginning of the 1st second, immediately)
314
+
-`0s` -- `-10%` (prima schimbare la începutul primei secunde, imediat)
315
315
-`1s` -- `-20%`
316
316
- ...
317
317
-`8s` -- `-90%`
318
-
- (the last second shows the final value).
318
+
- (în ultima secundă apare valoarea finală).
319
319
320
-
Here, the first change was immediate because of`start`in the`steps`.
320
+
Aici, prima schimbare a fost imediată din cauza`start`din`steps`.
321
321
322
-
The alternative value `end`would mean that the change should be applied not in the beginning, but at the end of each second.
322
+
Valoarea alternativă `end`ar însemna că modificarea ar trebui aplicată nu la început, ci la sfârșitul fiecărei secunde.
323
323
324
-
So the process for `steps(9, end)`would go like this:
324
+
Deci procesul pentru `steps(9, end)`ar merge așa:
325
325
326
-
-`0s` -- `0` (during the first second nothing changes)
327
-
-`1s` -- `-10%` (first change at the end of the 1st second)
326
+
-`0s` -- `0` (în decursul primei secunde nu se schimbă nimic)
327
+
-`1s` -- `-10%` (prima schimbare la sfârșitul primei secunde)
328
328
-`2s` -- `-20%`
329
329
- ...
330
330
-`9s` -- `-90%`
331
331
332
-
Here's`steps(9, end)`in action (note the pause before the first digit change):
332
+
Iată`steps(9, end)`în acțiune (notați pauza de dinaintea schimbării primei cifre):
333
333
334
334
[codetabs src="step-end"]
335
335
336
-
There are also some pre-defined shorthands for`steps(...)`:
336
+
Sunt de asemenea câteva prescurtări predefinite pentru`steps(...)`:
337
337
338
-
-`step-start` -- is the same as`steps(1, start)`. That is, the animation starts immediately and takes 1 step. So it starts and finishes immediately, as if there were no animation.
339
-
-`step-end` -- the same as`steps(1, end)`: make the animation in a single step at the end of`transition-duration`.
338
+
-`step-start` -- este același lucru cu`steps(1, start)`. Adică, animația începe imediat și face 1 pas. Deci începe și se termină imediat, ca și cum nu ar exista nicio animație.
339
+
-`step-end` -- la fel ca`steps(1, end)`: face animația într-un singur pas la sfârșitul`transition-duration`.
340
340
341
-
These values are rarely used, as they represent not a real animation, but rather a single-step change. We mention them here for completeness.
341
+
Aceste valori sunt rareori folosite, deoarece nu reprezintă o animație reală, ci mai degrabă o schimbare într-un singur pas. Le menționăm aici pentru completitudine.
0 commit comments