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
+12-13Lines changed: 12 additions & 13 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,16 +1,16 @@
1
1
# CSS-animations
2
2
3
-
CSS animations make it possible to do simple animations without JavaScript at all.
3
+
نیمیشنهای CSS امکان انجام انیمیشنهای ساده را بدون جاوا اسکریپت فراهم میکنند.
4
4
5
-
JavaScript can be used to control CSS animations and make them even better, with little code.
5
+
جاوا اسکریپت می تواند برای کنترل انیمیشن های CSS و حتی بهتر کردن آنها با کد کمی استفاده شود.
6
6
7
-
## CSS transitions[#css-transition]
7
+
## انتقال 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
+
ایده انتقال CSS ساده است. ما یک ویژگی را توضیح می دهیم و چگونه تغییرات آن باید متحرک شود. هنگامی که ویژگی تغییر می کند، مرورگر انیمیشن را رنگ می کند.
10
10
11
-
That is, all we need is to change the property, and the fluid transition will be done by the browser.
11
+
یعنی تنها چیزی که نیاز داریم تغییر ویژگی است و انتقال سیال توسط مرورگر انجام می شود.
12
12
13
-
For instance, the CSS below animates changes of `background-color` for 3 seconds:
13
+
برای مثال، CSS زیر تغییرات 'رنگ پسزمینه' را به مدت ۳ ثانیه متحرک میکند:
14
14
15
15
```css
16
16
.animated {
@@ -19,9 +19,9 @@ 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
+
حال اگر عنصری دارای کلاس '.animated' باشد، هر تغییری در 'رنگ پسزمینه' در طول 3 ثانیه متحرک میشود.
23
23
24
-
Click the button below to animate the background:
24
+
برای متحرک سازی پس زمینه روی دکمه زیر کلیک کنید:
25
25
26
26
```html run autorun height=60
27
27
<buttonid="color">Click me</button>
@@ -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
+
4 ویژگی برای توصیف انتقال 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
+
ما آنها را در یک لحظه پوشش خواهیم داد، فعلاً توجه داشته باشیم که ویژگی مشترک 'transition' اجازه می دهد تا آنها را با هم به ترتیب اعلام کنیم: 'تأخیر زمان بندی-عملکرد مدت زمان' و همچنین متحرک سازی چندین ویژگی به طور همزمان.
51
51
52
-
For instance, this button animates both`color`and `font-size`:
52
+
به عنوان مثال، این دکمه هم`color`و هم `font-size` را متحرک می کند:
53
53
54
54
```html run height=80 autorun no-beautify
55
55
<buttonid="growing">Click me</button>
@@ -70,8 +70,7 @@ growing.onclick = function() {
70
70
</script>
71
71
```
72
72
73
-
Now, let's cover animation properties one by one.
74
-
73
+
حالا بیایید ویژگی های انیمیشن را یکی یکی پوشش دهیم.
75
74
## transition-property
76
75
77
76
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".
0 commit comments