aboutsummaryrefslogtreecommitdiff
path: root/files/ru/web/css/animation
diff options
context:
space:
mode:
authorPeter Bengtsson <mail@peterbe.com>2020-12-08 14:42:52 -0500
committerPeter Bengtsson <mail@peterbe.com>2020-12-08 14:42:52 -0500
commit074785cea106179cb3305637055ab0a009ca74f2 (patch)
treee6ae371cccd642aa2b67f39752a2cdf1fd4eb040 /files/ru/web/css/animation
parentda78a9e329e272dedb2400b79a3bdeebff387d47 (diff)
downloadtranslated-content-074785cea106179cb3305637055ab0a009ca74f2.tar.gz
translated-content-074785cea106179cb3305637055ab0a009ca74f2.tar.bz2
translated-content-074785cea106179cb3305637055ab0a009ca74f2.zip
initial commit
Diffstat (limited to 'files/ru/web/css/animation')
-rw-r--r--files/ru/web/css/animation/index.html118
1 files changed, 118 insertions, 0 deletions
diff --git a/files/ru/web/css/animation/index.html b/files/ru/web/css/animation/index.html
new file mode 100644
index 0000000000..3abcbb06a7
--- /dev/null
+++ b/files/ru/web/css/animation/index.html
@@ -0,0 +1,118 @@
+---
+title: animation
+slug: Web/CSS/animation
+translation_of: Web/CSS/animation
+---
+<div>{{CSSRef}}</div>
+
+<p><a href="/en-US/docs/Web/CSS">CSS</a> свойство <strong><code>animation</code></strong> это <a href="/en-US/docs/Web/CSS/Shorthand_properties">короткая запись</a> для {{cssxref("animation-name")}}, {{cssxref("animation-duration")}}, {{cssxref("animation-timing-function")}}, {{cssxref("animation-delay")}}, {{cssxref("animation-iteration-count")}}, {{cssxref("animation-direction")}}, {{cssxref("animation-fill-mode")}} и {{cssxref("animation-play-state")}}.</p>
+
+<p>{{EmbedInteractiveExample("pages/css/animation.html")}}</p>
+
+<p><a href="/en-US/docs/Web/Guide/CSS/Using_CSS_transitions#Which_CSS_properties_are_animatable">Описание того, какие свойства являются анимируемые</a> доступно; стоит отметить, что это описание также подходит для <a href="/en-US/docs/Web/Guide/CSS/Using_CSS_transitions">CSS переходов</a>.</p>
+
+<p>{{cssinfo}}</p>
+
+<h2 id="Синтаксис">Синтаксис</h2>
+
+<pre class="brush:css notranslate">/* @keyframes duration | timing-function | delay |
+ iteration-count | direction | fill-mode | play-state | name */
+ animation: 3s ease-in 1s 2 reverse both paused slidein;
+
+/* @keyframes duration | timing-function | delay | name */
+ animation: 3s linear 1s slidein;
+
+/* @keyframes duration | name */
+ animation: 3s slidein;
+</pre>
+
+<p>Порядок важен в каждом определении анимации: первое значение, которое может быть проанализировано как {{cssxref("&lt;time&gt;")}} присваивается {{cssxref("animation-duration")}}, и второй назначен {{cssxref("animation-delay")}}.</p>
+
+<p>Note that order is also important within each animation definition for distinguishing {{cssxref("animation-name")}} values from other keywords. When parsing, keywords that are valid for properties other than {{cssxref("animation-name")}} whose values were not found earlier in the shorthand must be accepted for those properties rather than for {{cssxref("animation-name")}}. Furthermore, when serializing, default values of other properties must be output in at least the cases necessary to distinguish an {{cssxref("animation-name")}} that could be a value of another property, and may be output in additional cases.</p>
+
+<h3 id="Формальный_синтаксис">Формальный синтаксис</h3>
+
+<pre class="syntaxbox notranslate">{{csssyntax}}</pre>
+
+<h2 id="Примеры">Примеры</h2>
+
+<p>Посмотрите примеры <a href="/en-US/docs/Web/CSS/CSS_Animations/Using_CSS_animations">CSS анимаций.</a></p>
+
+<h3 id="Cylon_Eye">Cylon Eye</h3>
+
+<p>Учитывая все специфичные для браузеров префиксы, вот анимация цилиндрического глаза, включающая линейные градиенты и анимацию, которая работает во всех основных браузерах:</p>
+
+<pre class="brush: html notranslate">&lt;div class="view_port"&gt;
+ &lt;div class="polling_message"&gt;
+ Listening for dispatches
+ &lt;/div&gt;
+ &lt;div class="cylon_eye"&gt;&lt;/div&gt;
+&lt;/div&gt;
+</pre>
+
+<pre class="brush: css notranslate">.polling_message {
+ color: white;
+ float: left;
+ margin-right: 2%;
+}
+
+.view_port {
+ background-color: black;
+ height: 25px;
+ width: 100%;
+ overflow: hidden;
+}
+
+.cylon_eye {
+ background-color: red;
+ background-image: -webkit-linear-gradient( left, rgba( 0,0,0,0.9 ) 25%, rgba( 0,0,0,0.1 ) 50%, rgba( 0,0,0,0.9 ) 75%);
+ background-image: -moz-linear-gradient( left, rgba( 0,0,0,0.9 ) 25%, rgba( 0,0,0,0.1 ) 50%, rgba( 0,0,0,0.9 ) 75%);
+ background-image: -o-linear-gradient( left, rgba( 0,0,0,0.9 ) 25%, rgba( 0,0,0,0.1 ) 50%, rgba( 0,0,0,0.9 ) 75%);
+ background-image: linear-gradient(to right, rgba( 0,0,0,0.9 ) 25%, rgba( 0,0,0,0.1 ) 50%, rgba( 0,0,0,0.9 ) 75%);
+ color: white;
+ height: 100%;
+ width: 20%;
+
+ -webkit-animation: 4s linear 0s infinite alternate move_eye;
+ -moz-animation: 4s linear 0s infinite alternate move_eye;
+ -o-animation: 4s linear 0s infinite alternate move_eye;
+ animation: 4s linear 0s infinite alternate move_eye;
+}
+
+@-webkit-keyframes move_eye { from { margin-left:-20%; } to { margin-left:100%; } }
+ @-moz-keyframes move_eye { from { margin-left:-20%; } to { margin-left:100%; } }
+ @-o-keyframes move_eye { from { margin-left:-20%; } to { margin-left:100%; } }
+ @keyframes move_eye { from { margin-left:-20%; } to { margin-left:100%; } }
+</pre>
+
+<p>{{EmbedLiveSample('Cylon_Eye')}}</p>
+
+<h2 id="Спецификации">Спецификации</h2>
+
+<table class="standard-table">
+ <thead>
+ <tr>
+ <th scope="col">Спецификация</th>
+ <th scope="col">Статус</th>
+ <th scope="col">Комментарий</th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td>{{SpecName('CSS3 Animations', '#animation', 'animation')}}</td>
+ <td>{{Spec2('CSS3 Animations')}}</td>
+ <td>Изначальное определение</td>
+ </tr>
+ </tbody>
+</table>
+
+<h2 id="Совместимость_с_браузерами">Совместимость с браузерами</h2>
+
+<p>{{Compat("css.properties.animation")}}</p>
+
+<h2 id="Смотрите_также">Смотрите также</h2>
+
+<ul>
+ <li><a href="/en-US/docs/Web/CSS/CSS_Animations/Using_CSS_animations">Использование  CSS анимации</a></li>
+ <li>JavaScript {{domxref("AnimationEvent")}} API</li>
+</ul>