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
`*` -- by default, if there's no timing function, `ease` is used.
209
+
`*` -- în mod implicit, dacă nu există un timing function, se utilizează `ease`.
210
210
211
-
So we could use`ease-out`for our slowing down train:
211
+
Deci am putea folosi`ease-out`pentru trenul nostru care încetinește:
212
212
213
213
```css
214
214
.train {
215
215
left: 0;
216
216
transition: left5sease-out;
217
-
/*same as transition: left 5s cubic-bezier(0, .5, .5, 1); */
217
+
/*la fel ca transition: left 5s cubic-bezier(0, .5, .5, 1); */
218
218
}
219
219
```
220
220
221
-
But it looks a bit differently.
221
+
Dar arată puțin diferit.
222
222
223
-
**A Bezier curve can make the animation exceed its range.**
223
+
**O curbă Bezier poate face ca animația să-și depășească intervalul.**
224
224
225
-
The control points on the curve can have any`y` coordinates: even negative or huge ones. Then the Bezier curve would also extend very low or high, making the animation go beyond its normal range.
225
+
Punctele de control de pe curbă pot avea orice coordonate`y`: chiar și negative sau uriașe. Atunci curba Bezier se va extinde și ea foarte jos sau foarte sus, făcând ca animația să își depășească intervalul normal.
226
226
227
-
In the example below the animation code is:
227
+
În exemplul de mai jos codul animației este:
228
228
229
229
```css
230
230
.train {
231
231
left: 100px;
232
232
transition: left5scubic-bezier(.5, -1, .5, 2);
233
-
/*click on a train sets left to 450px */
233
+
/*apăsând pe tren setează left la 450px */
234
234
}
235
235
```
236
236
237
-
The property `left`should animate from `100px`to`400px`.
237
+
Proprietatea `left`ar trebui să fie animată de la `100px`la`400px`.
238
238
239
-
But if you click the train, you'll see that:
239
+
Dar dacă apăsați pe tren, veți vedea că:
240
240
241
-
-First, the train goes *back*: `left`becomes less than`100px`.
242
-
-Then it goes forward, a little bit farther than`400px`.
243
-
-And then back again -- to`400px`.
241
+
-În primul rând, trenul merge *înapoi*: `left`devine mai mic de`100px`.
242
+
-Apoi merge înainte, puțin mai departe de`400px`.
243
+
-Și după aceea iar înapoi -- la`400px`.
244
244
245
245
[codetabs src="train-over"]
246
246
247
-
Why it happens is pretty obvious if we look at the graph of the given Bezier curve:
247
+
De ce se întâmplă acest lucru este destul de evident dacă ne uităm la graficul curbei Bezier dat:
248
248
249
249

250
250
251
-
We moved the`y`coordinate of the 2nd point below zero, and for the 3rd point we made it over`1`, so the curve goes out of the "regular" quadrant. The `y`is out of the "standard" range`0..1`.
251
+
Am mutat coordonata`y`a celui de-al doilea punct sub zero, iar pentru cel de-al treilea punct am făcut-o peste`1`, astfel încât curba iese din cadranul "obișnuit". `y`a ieșit din intervalul "standard" `0..1`.
252
252
253
-
As we know, `y`measures "the completion of the animation process". The value `y = 0`corresponds to the starting property value and`y = 1` -- the ending value. So values`y<0`move the property beyond the starting `left`and`y>1` -- past the final `left`.
253
+
După cum știm, `y`măsoară "finalizarea procesului de animație". Valoarea `y = 0`corespunde valorii de început a proprietății iar`y = 1` -- valorii finale. Deci valorile`y<0`mută proprietatea dincolo de începutul `left`și`y>1` -- peste `left` de final.
254
254
255
-
That's a "soft" variant for sure. If we put `y`values like `-99`and`99`then the train would jump out of the range much more.
255
+
Aceasta este cu siguranță o variantă "soft". Dacă am pune valori `y`ca `-99`și`99`atunci trenul ar sări mult mai mult din interval.
256
256
257
-
But how do we make a Bezier curve for a specific task? There are many tools.
257
+
Dar cum facem o curbă Bezier pentru o anumită sarcină? Există multe instrumente.
258
258
259
-
-For instance, we can do it on the site <https://cubic-bezier.com>.
260
-
-Browser developer tools also have special support for Bezier curves in CSS:
261
-
1.Open the developer tools with`key:F12` (Mac: `key:Cmd+Opt+I`).
262
-
2.Select the`Elements` tab, then pay attention to the `Styles`sub-panel at the right side.
263
-
3. CSS properties with a word `cubic-bezier`will have an icon before this word.
264
-
4.Click this icon to edit the curve.
259
+
-De exemplu, o putem face pe site-ul<https://cubic-bezier.com>.
260
+
-Instrumentele de dezvoltare a browserului au, de asemenea, un suport special pentru curbele Bezier în CSS:
0 commit comments