From 33058f2b292b3a581333bdfb21b8f671898c5060 Mon Sep 17 00:00:00 2001 From: Peter Bengtsson Date: Tue, 8 Dec 2020 14:40:17 -0500 Subject: initial commit --- files/zh-cn/web/svg/element/animate/index.html | 145 +++++++++++++++++++++++++ 1 file changed, 145 insertions(+) create mode 100644 files/zh-cn/web/svg/element/animate/index.html (limited to 'files/zh-cn/web/svg/element/animate') diff --git a/files/zh-cn/web/svg/element/animate/index.html b/files/zh-cn/web/svg/element/animate/index.html new file mode 100644 index 0000000000..3151843fe0 --- /dev/null +++ b/files/zh-cn/web/svg/element/animate/index.html @@ -0,0 +1,145 @@ +--- +title: animate +slug: Web/SVG/Element/animate +tags: + - SVG + - SVG动画 + - 元素 +translation_of: Web/SVG/Element/animate +--- +
{{SVGRef}}
+ +

动画元素放在形状元素的内部,用来定义一个元素的某个属性如何踩着时点改变。在指定持续时间里,属性从开始值变成结束值。

+ +
html,body,svg { height:100%; margin:0; padding:0; }
+ +
<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>
+ +

{{EmbedLiveSample('Exemple', 150, '100%')}}

+ +

属性

+ +

全局属性

+ + + +

专有属性

+ + + +

用法

+ +

该元素实现了 {{domxref("SVGAnimateElement")}} 接口

+ +

该元素实现了SVGAnimateElement 接口。

+ +

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 to create a complimentary experience for users who have expressed a preference for no animated experiences.

+ + + +

规范

+ + + + + + + + + + + + + + + + + + + + + +
SpecificationStatusComment
{{SpecName("SVG Animations 2", "#AnimateElement", "<animate>")}}{{Spec2("SVG Animations 2")}}No change
{{SpecName("SVG1.1", "animate.html#AnimateElement", "<animate>")}}{{Spec2("SVG1.1")}}Initial definition
+ +

浏览器兼容性

+ +
{{CompatibilityTable}}
+ +
+ + + + + + + + + + + + + + + + + + + +
FeatureChromeFirefox (Gecko)Internet ExplorerOperaSafari (WebKit)
Basic support{{CompatChrome('2.0')}}{{CompatGeckoDesktop("2.0")}}{{CompatNo}}9.0{{CompatSafari('4.0')}}
+
+ +
+ + + + + + + + + + + + + + + + + + + +
FeatureAndroidFirefox Mobile (Gecko)IE PhoneOpera MobileSafari Mobile
Basic support{{CompatUnknown}}{{CompatGeckoMobile("2.0")}}{{CompatNo}}9.5{{CompatSafari('4.0')}}
+
+ +

该表格基于这些资源

-- cgit v1.2.3-54-g00ecf