diff options
author | Peter Bengtsson <mail@peterbe.com> | 2020-12-08 14:42:52 -0500 |
---|---|---|
committer | Peter Bengtsson <mail@peterbe.com> | 2020-12-08 14:42:52 -0500 |
commit | 074785cea106179cb3305637055ab0a009ca74f2 (patch) | |
tree | e6ae371cccd642aa2b67f39752a2cdf1fd4eb040 /files/ru/web/css/animation-timing-function | |
parent | da78a9e329e272dedb2400b79a3bdeebff387d47 (diff) | |
download | translated-content-074785cea106179cb3305637055ab0a009ca74f2.tar.gz translated-content-074785cea106179cb3305637055ab0a009ca74f2.tar.bz2 translated-content-074785cea106179cb3305637055ab0a009ca74f2.zip |
initial commit
Diffstat (limited to 'files/ru/web/css/animation-timing-function')
-rw-r--r-- | files/ru/web/css/animation-timing-function/index.html | 92 |
1 files changed, 92 insertions, 0 deletions
diff --git a/files/ru/web/css/animation-timing-function/index.html b/files/ru/web/css/animation-timing-function/index.html new file mode 100644 index 0000000000..c9c5c388b1 --- /dev/null +++ b/files/ru/web/css/animation-timing-function/index.html @@ -0,0 +1,92 @@ +--- +title: animation-timing-function +slug: Web/CSS/animation-timing-function +translation_of: Web/CSS/animation-timing-function +--- +<p>{{CSSRef}}</p> + +<p><a href="/en-US/docs/CSS" title="CSS">CSS</a> свойство <code><strong>animation-timing-function</strong></code> задаёт как происходит анимация в течении длительности каждого цикла.</p> + +<p>{{EmbedInteractiveExample("pages/css/animation-timing-function.html")}}</p> + + + +<p>Достаточно удобно использовать сокращённое свойство {{cssxref("animation")}} для того, чтобы установить все свойства для анимации одновременно.</p> + +<h2 id="Синтаксис">Синтаксис</h2> + +<pre class="brush: css no-line-numbers language-css"><code class="language-css"><span class="comment token">/* Keyword values */</span> +<span class="property token">animation-timing-function</span><span class="punctuation token">:</span> ease<span class="punctuation token">;</span> +<span class="property token">animation-timing-function</span><span class="punctuation token">:</span> ease-in<span class="punctuation token">;</span> +<span class="property token">animation-timing-function</span><span class="punctuation token">:</span> ease-out<span class="punctuation token">;</span> +<span class="property token">animation-timing-function</span><span class="punctuation token">:</span> ease-in-out<span class="punctuation token">;</span> +<span class="property token">animation-timing-function</span><span class="punctuation token">:</span> linear<span class="punctuation token">;</span> +<span class="property token">animation-timing-function</span><span class="punctuation token">:</span> step-start<span class="punctuation token">;</span> +<span class="property token">animation-timing-function</span><span class="punctuation token">:</span> step-end<span class="punctuation token">;</span> + +<span class="comment token">/* Function values */</span> +<span class="property token">animation-timing-function</span><span class="punctuation token">:</span> <span class="function token">cubic-bezier</span><span class="punctuation token">(</span><span class="number token">0.1</span><span class="punctuation token">,</span> <span class="number token">0.7</span><span class="punctuation token">,</span> <span class="number token">1.0</span><span class="punctuation token">,</span> <span class="number token">0.1</span><span class="punctuation token">)</span><span class="punctuation token">;</span> +<span class="property token">animation-timing-function</span><span class="punctuation token">:</span> <span class="function token">steps</span><span class="punctuation token">(</span><span class="number token">4</span><span class="punctuation token">,</span> end<span class="punctuation token">)</span><span class="punctuation token">;</span> + +<span class="comment token">/* Steps Function keywords */</span> +<span class="property token">animation-timing-function</span><span class="punctuation token">:</span> <span class="function token">steps</span><span class="punctuation token">(</span><span class="number token">4</span><span class="punctuation token">,</span> jump-start<span class="punctuation token">)</span><span class="punctuation token">;</span> +<span class="property token">animation-timing-function</span><span class="punctuation token">:</span> <span class="function token">steps</span><span class="punctuation token">(</span><span class="number token">10</span><span class="punctuation token">,</span> jump-end<span class="punctuation token">)</span><span class="punctuation token">;</span> +<span class="property token">animation-timing-function</span><span class="punctuation token">:</span> <span class="function token">steps</span><span class="punctuation token">(</span><span class="number token">20</span><span class="punctuation token">,</span> jump-none<span class="punctuation token">)</span><span class="punctuation token">;</span> +<span class="property token">animation-timing-function</span><span class="punctuation token">:</span> <span class="function token">steps</span><span class="punctuation token">(</span><span class="number token">5</span><span class="punctuation token">,</span> jump-both<span class="punctuation token">)</span><span class="punctuation token">;</span> +<span class="property token">animation-timing-function</span><span class="punctuation token">:</span> <span class="function token">steps</span><span class="punctuation token">(</span><span class="number token">6</span><span class="punctuation token">,</span> start<span class="punctuation token">)</span><span class="punctuation token">;</span> +<span class="property token">animation-timing-function</span><span class="punctuation token">:</span> <span class="function token">steps</span><span class="punctuation token">(</span><span class="number token">8</span><span class="punctuation token">,</span> end<span class="punctuation token">)</span><span class="punctuation token">;</span> + +<span class="comment token">/* Multiple animations */</span> +<span class="property token">animation-timing-function</span><span class="punctuation token">:</span> ease<span class="punctuation token">,</span> step-start<span class="punctuation token">,</span> <span class="function token">cubic-bezier</span><span class="punctuation token">(</span><span class="number token">0.1</span><span class="punctuation token">,</span> <span class="number token">0.7</span><span class="punctuation token">,</span> <span class="number token">1.0</span><span class="punctuation token">,</span> <span class="number token">0.1</span><span class="punctuation token">)</span><span class="punctuation token">;</span> + +<span class="comment token">/* Global values */</span> +<span class="property token">animation-timing-function</span><span class="punctuation token">:</span> inherit<span class="punctuation token">;</span> +<span class="property token">animation-timing-function</span><span class="punctuation token">:</span> initial<span class="punctuation token">;</span> +<span class="property token">animation-timing-function</span><span class="punctuation token">:</span> unset<span class="punctuation token">;</span></code></pre> + +<p>Временные функции могут быть установлены в пользовательских keyframes'ах в правилах <a href="/en-US/docs/Web/CSS/@keyframes">@keyframes</a>. Если в keyframe'е значение <code><strong>animation-timing-function</strong></code> указано, соответствующее значение <code><strong>animation-timing-function</strong></code> от элемента к которому анимация применена используется для этого keyframe'а.</p> + +<h3 id="Значения">Значения</h3> + +<dl> + <dt><code><timingfunction></code></dt> + <dd>Каждый {{cssxref("<timing-function>")}} представляет функцию расчета времени для связи с соответствующим свойством animate, как определено в {{cssxref("animation-property")}}.</dd> +</dl> + +<h3 id="Формальный_синтаксис">Формальный синтаксис</h3> + +<pre class="syntaxbox">{{csssyntax}}</pre> + +<h2 id="Примеры">Примеры</h2> + +<p>См. <a href="/en-US/docs/Web/CSS/CSS_Animations/Using_CSS_animations" title="en-US/docs/CSS/CSS_animations">CSS animations</a>.</p> + +<h2 id="Specifications" name="Specifications">Спецификации</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-timing-function', 'animation-timing-function')}}</td> + <td>{{Spec2('CSS3 Animations')}}</td> + <td>Начальное определение</td> + </tr> + </tbody> +</table> + +<h2 id="Browser_compatibility" name="Browser_compatibility">Совместимость с браузерами</h2> + +<p>{{Compat("css.properties.animation-timing-function")}}</p> + +<p><span style='font-family: x-locale-heading-primary,zillaslab,Palatino,"Palatino Linotype",x-locale-heading-secondary,serif; font-size: 2.33333rem; letter-spacing: -0.00278rem;'>Смотрите также</span></p> + +<ul> + <li><a href="/en-US/docs/Web/CSS/CSS_Animations/Using_CSS_animations" title="CSS developer guide about CSS animations">Использование CSS анимаций</a></li> + <li>{{domxref("AnimationEvent", "AnimationEvent")}}</li> +</ul> |