From c058fa0fb22dc40ef0225b21a97578cddd0aaffa Mon Sep 17 00:00:00 2001 From: Florian Merz Date: Thu, 11 Feb 2021 14:51:05 +0100 Subject: unslug ru: move --- files/ru/web/svg/element/animatemotion/index.html | 112 ++++++++++++++++++++++ 1 file changed, 112 insertions(+) create mode 100644 files/ru/web/svg/element/animatemotion/index.html (limited to 'files/ru/web/svg/element/animatemotion/index.html') diff --git a/files/ru/web/svg/element/animatemotion/index.html b/files/ru/web/svg/element/animatemotion/index.html new file mode 100644 index 0000000000..3b1259dcb3 --- /dev/null +++ b/files/ru/web/svg/element/animatemotion/index.html @@ -0,0 +1,112 @@ +--- +title: +slug: Web/SVG/Элемент/animateMotion +tags: + - SVG + - svg анимация + - Элемент +translation_of: Web/SVG/Element/animateMotion +--- +
{{SVGRef}}
+ +

Элемент <animateMotion> вызывает перемещение ссылочного элемента вдоль пути движения.

+ +

Контекст использования

+ +

{{svginfo}}

+ +

Атрибуты

+ +

Глобальные атрибуты

+ + + +

Собственные атрибуты

+ + + +

DOM интерфейс

+ +

Этот элемент реализует интерфейс {{domxref("SVGAnimateMotionElement")}}.

+ +

Пример

+ +

SVG

+ +
<?xml version="1.0"?>
+<svg width="120" height="120" viewBox="0 0 120 120"
+    xmlns="http://www.w3.org/2000/svg" version="1.1"
+    xmlns:xlink="http://www.w3.org/1999/xlink">
+
+  <!-- Рисуем серый контур движения с двумя
+       маленькими кружками в ключевых точках -->
+  <path id="theMotionPath" stroke="lightgrey" stroke-width="2" fill="none"
+        d="M10,110 A120,120 -45 0,1 110 10 A120,120 -45 0,1 10,110" />
+  <circle cx="10" cy="110" r="3" fill="lightgrey"  />
+  <circle cx="110" cy="10" r="3" fill="lightgrey"  />
+
+  <!-- Рисуем красный круг, который будет перемещаться
+       вдоль траектории движения. -->
+  <circle cx="" cy="" r="5" fill="red">
+
+  <!-- Определяем анимацию пути движения -->
+    <animateMotion dur="6s" repeatCount="indefinite">
+      <mpath xlink:href="#theMotionPath"/>
+    </animateMotion>
+  </circle>
+</svg>
+ +

Результат

+ +

{{EmbedLiveSample("Пример", 120, 120)}}

+ +

Характеристики

+ + + + + + + + + + + + + + + + + + + + + +
СпецификацияСтатусКомментарий
{{SpecName("SVG Animations 2", "#AnimateMotionElement", "<animateMotion>")}}{{Spec2("SVG Animations 2")}}Без изменений
{{SpecName('SVG1.1', 'animate.html#AnimateMotionElement', '<animateMotion>')}}{{Spec2('SVG1.1')}}Начальное определение
+ +

Совместимость с браузерами

+ + + +

{{Compat("svg.elements.animateMotion")}}

+ +

Смотрите также

+ + -- cgit v1.2.3-54-g00ecf