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
+22-22Lines changed: 22 additions & 22 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,16 +1,16 @@
1
-
# CSS-animations
1
+
# Animații CSS
2
2
3
-
CSS animations make it possible to do simple animations without JavaScript at all.
3
+
Animațiile CSS fac posibilă realizarea unor animații simple fără JavaScript.
4
4
5
-
JavaScript can be used to control CSS animations and make them even better, with little code.
5
+
JavaScript poate fi folosit pentru a controla animațiile CSS și pentru a le face chiar mai bune, cu puțin cod.
6
6
7
-
## CSS transitions[#css-transition]
7
+
## Tranziții CSS[#css-transition]
8
8
9
-
The idea of CSS transitions is simple. We describe a property and how its changes should be animated. When the property changes, the browser paints the animation.
9
+
Ideea tranzițiilor CSS este simplă. Descriem o proprietate și modul în care modificările acesteia trebuie să fie animate. Când proprietatea se modifică, browserul pictează animația.
10
10
11
-
That is, all we need is to change the property, and the fluid transition will be done by the browser.
11
+
Adică, tot ce avem nevoie este să modificăm proprietatea, iar tranziția fluidă va fi realizată de browser.
12
12
13
-
For instance, the CSS below animates changes of `background-color`for 3 seconds:
13
+
De exemplu, CSS-ul de mai jos animează schimbările de `background-color`timp de 3 secunde:
14
14
15
15
```css
16
16
.animated {
@@ -19,12 +19,12 @@ For instance, the CSS below animates changes of `background-color` for 3 seconds
19
19
}
20
20
```
21
21
22
-
Now if an element has `.animated` class, any change of`background-color`is animated during 3 seconds.
22
+
Acum dacă un element are clasa `.animated`, orice schimbare a`background-color`este animată timp de 3 secunde.
23
23
24
-
Click the button below to animate the background:
24
+
Faceți clic pe butonul de mai jos pentru a anima fundalul:
25
25
26
26
```html run autorun height=60
27
-
<buttonid="color">Click me</button>
27
+
<buttonid="color">Apasă-mă</button>
28
28
29
29
<style>
30
30
#color {
@@ -40,16 +40,16 @@ Click the button below to animate the background:
40
40
</script>
41
41
```
42
42
43
-
There are 4 properties to describe CSS transitions:
43
+
Sunt 4 proprietăți pentru a descrie tranzițiile CSS:
44
44
45
45
-`transition-property`
46
46
-`transition-duration`
47
47
-`transition-timing-function`
48
48
-`transition-delay`
49
49
50
-
We'll cover them in a moment, for now let's note that the common `transition`property allows declaring them together in the order: `property duration timing-function delay`, as well as animating multiple properties at once.
50
+
Le vom acoperi imediat, deocamdată să observăm că proprietatea comună `transition`permite declararea lor împreună în ordine: `proprietate durată temporizare-funcție întârziere`, precum și animarea mai multor proprietăți în același timp.
51
51
52
-
For instance, this button animates both`color`and`font-size`:
52
+
De exemplu, acest buton animează atât`color`cât și`font-size`:
Acum, să acoperim proprietățile de animație una câte una.
74
74
75
-
## transition-property
75
+
## transition-propriety
76
76
77
-
In`transition-property`, we write a list of properties to animate, for instance: `left`, `margin-left`, `height`, `color`. Or we could write `all`, which means "animate all properties".
77
+
În`transition-property`, scriem o listă de proprietăți de animat, de exemplu: `left`, `margin-left`, `height`, `color`. Sau putem scrie `all`, ceea ce înseamnă "animă toate proprietățile".
78
78
79
-
Do note that, there are properties which can not be animated. However, [most of the generally used properties are animatable](https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_animated_properties).
79
+
Notați că, sunt proprietăți care nu pot fi animate. Cu toate acestea, [majoritatea proprietăților utilizate în general pot fi animate](https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_animated_properties).
80
80
81
81
## transition-duration
82
82
83
-
In`transition-duration`we can specify how long the animation should take. The time should be in[CSS time format](https://www.w3.org/TR/css3-values/#time): in seconds`s`or milliseconds`ms`.
83
+
În`transition-duration`putem specifica cât timp trebuie să dureze animația. Timpul trebuie să fie în[CSS time format](https://www.w3.org/TR/css3-values/#time): în secunde`s`sau milisecunde`ms`.
84
84
85
85
## transition-delay
86
86
87
-
In`transition-delay`we can specify the delay *before* the animation. For instance, if`transition-delay`is`1s`and`transition-duration`is`2s`, then the animation starts 1 second after the property change and the total duration will be 2 seconds.
87
+
În`transition-delay`putem specifica întârzierea *înainte* de animație. De exemplu, dacă`transition-delay`este`1s`și`transition-duration`este`2s`, atunci animația începe la 1 secundă după modificarea proprietății iar durata totală va fi de 2 secunde.
88
88
89
-
Negative values are also possible. Then the animation is shown immediately, but the starting point of the animation will be after given value (time). For example, if`transition-delay`is`-1s`and`transition-duration`is`2s`, then animation starts from the halfway point and total duration will be 1 second.
89
+
Sunt posibile și valori negative. Atunci animația este afișată imediat, dar punctul de pornire al animației va fi după valoarea dată (timpul). De exemplu, dacă`transition-delay`este`-1s`și`transition-duration`este`2s`, atunci animația începe de la jumătatea intervalului și durata totală va fi de 1 secundă.
90
90
91
-
Here the animation shifts numbers from `0`to`9`using CSS `translate` property:
91
+
Aici animația schimbă numerele din `0`în`9`folosind proprietatea CSS `translate`:
0 commit comments