Spec-Zone.ru › SVG

<animate>

Baseline Widely available

This feature is well established and works across many devices and browser versions. It’s been available across browsers since ⁨January 2020⁩.

  • Learn more
  • See full compatibility
  • Report feedback

The <animate> SVG element provides a way to animate an attribute of an element over time.

Usage context

Categories Animation element
Permitted content Any number of the following elements, in any order:
Descriptive elements

Attributes

This element only includes global attributes.

DOM Interface

This element implements the SVGAnimateElement interface.

Example

<svg viewBox="0 0 10 10" xmlns="http://www.w3.org/2000/svg">
  <rect width="10" height="10">
    <animate
      attributeName="rx"
      values="0;5;0"
      dur="10s"
      repeatCount="indefinite" />
  </rect>
</svg>

Accessibility concerns

Blinking and flashing animation can be problematic for people with cognitive concerns such as Attention Deficit Hyperactivity Disorder (ADHD). Additionally, certain kinds of motion can be a trigger for Vestibular disorders, epilepsy, and migraine and Scotopic sensitivity.

Consider providing a mechanism for pausing or disabling animation, as well as using the Reduced Motion Media Query or equivalent User Agent client hint Sec-CH-Prefers-Reduced-Motion to create a complimentary experience for users who have expressed a preference for no animated experiences.

  • Designing Safer Web Animation For Motion Sensitivity · An A List Apart Article
  • An Introduction to the Reduced Motion Media Query | CSS-Tricks
  • Responsive Design for Motion | WebKit
  • MDN Understanding WCAG, Guideline 2.2 explanations
  • Understanding Success Criterion 2.2.2 | W3C Understanding WCAG 2.0

Specifications

Specification
SVG Animations Level 2>
# AnimateElement>

Browser compatibility

Desktop Mobile
Chrome Edge Firefox Opera Safari Chrome Android Firefox for Android Opera Android Safari on IOS Samsung Internet WebView Android WebView on iOS
animate 2 79 4 9 3.1 18 4 10.1 2 1.0 4 2
attributeName 2 79 4 15 4 18 4 14 3.2 1.0 4.4 3.2
attributeType 2 79 4 15 4 18 4 14 3.2 1.0 4.4 3.2
dur 2 79 4 15 4 18 4 14 3.2 1.0 4.4 3.2
fill 2 79 4 15 3.1 18 4 14 2 1.0 4.4 2
from 2 79 4 15 4 18 4 14 3.2 1.0 4.4 3.2
href 50 79 51 37 12.1 50 51 37 12.2 5.0 50 12.2
repeatCount 2 79 4 15 4 18 4 14 3.2 1.0 4.4 3.2
systemLanguage 2 79 12 ≤12.1 3.1 18 14 ≤12.1 2 1.0 4.4 2
to 2 79 4 15 4 18 4 14 3.2 1.0 4.4 3.2

© 2005–2025 MDN contributors.
Licensed under the Creative Commons Attribution-ShareAlike License v2.5 or later.
https://developer.mozilla.org/en-US/docs/Web/SVG/Reference/Element/animate

Spec-Zone.ru

Настройки Оффлайн Что нового Помощь О нас
Spec-Zone .ru
спецификации, руководства, описания, API