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/ja/web/svg/attribute/fill/index.html | 456 +++++++++++++++++++++++++++++ 1 file changed, 456 insertions(+) create mode 100644 files/ja/web/svg/attribute/fill/index.html (limited to 'files/ja/web/svg/attribute/fill') diff --git a/files/ja/web/svg/attribute/fill/index.html b/files/ja/web/svg/attribute/fill/index.html new file mode 100644 index 0000000000..53e1408b09 --- /dev/null +++ b/files/ja/web/svg/attribute/fill/index.html @@ -0,0 +1,456 @@ +--- +title: fill +slug: Web/SVG/Attribute/fill +translation_of: Web/SVG/Attribute/fill +--- +
{{SVGRef}}
+ +

fill 属性には使われ方により2つの意味があります.  1つは図形やテキストに使われた場合で,その要素を塗りつぶす色を意味します.もう1つはアニメーションに使われた場合で,そのアニメーションの最終状態を定義します.

+ +

呈示属性(presentation attribute)として全ての要素に適用可能ですが,実際に影響があるのは次の11の要素です: {{SVGElement('altGlyph')}}, {{SVGElement('circle')}}, {{SVGElement('ellipse')}}, {{SVGElement('path')}}, {{SVGElement('polygon')}}, {{SVGElement('polyline')}}, {{SVGElement('rect')}}, {{SVGElement('text')}}, {{SVGElement('textPath')}}, {{SVGElement('tref')}}, and {{SVGElement('tspan')}}.

+ +

アニメーションとしては次の5つの要素で使われています: {{SVGElement('animate')}}, {{SVGElement('animateColor')}}, {{SVGElement('animateMotion')}}, {{SVGElement('animateTransform')}}, and {{SVGElement('set')}}.

+ +
+ + +
<svg viewBox="0 0 300 100" xmlns="http://www.w3.org/2000/svg">
+  <!-- Simple color fill -->
+  <circle cx="50" cy="50" r="40" fill="pink" />
+
+
+  <!-- Fill circle with a gradient -->
+  <defs>
+    <radialGradient id="myGradient">
+      <stop offset="0%"   stop-color="pink" />
+      <stop offset="100%" stop-color="black" />
+    </radialGradient>
+  </defs>
+
+  <circle cx="150" cy="50" r="40" fill="url(#myGradient)" />
+
+
+  <!--
+  Keeping the final state of an animated circle
+  which is a circle with a radius of 40.
+  -->
+  <circle cx="250" cy="50" r="20">
+    <animate attributeType="XML"
+             attributeName="r"
+             from="0" to="40" dur="5s"
+             fill="freeze" />
+  </circle>
+</svg>
+
+ +

{{EmbedLiveSample('topExample', '100%', 200)}}

+
+ +

altGlyph

+ +

Warning: As of SVG2 {{SVGElement('altGlyph')}} is deprecated and shouldn't be used.

+ +

For {{SVGElement('altGlyph')}}, fill is a presentation attribute that defines the color of the glyph.

+ + + + + + + + + + + + + + + + +
Value<paint>
Default valueblack
AnimatableYes
+ +

Note: As a presentation attribute fill can be used as a CSS property.

+ +

animate

+ +

For {{SVGElement('animate')}}, fill defines the final state of the animation.

+ + + + + + + + + + + + + + + + +
Valuefreeze (Keep the state of the last animation frame) | remove (Keep the state of the first animation frame)
Default valueremove
AnimatableNo
+ +

animateColor

+ +

Warning: As of SVG Animation 2 {{SVGElement('animateColor')}} is deprecated and shouldn't be used. Use {{SVGElement('animate')}} instead.

+ +

For {{SVGElement('animateColor')}}, fill defines the final state of the animation.

+ + + + + + + + + + + + + + + + +
Valuefreeze (Keep the state of the last animation frame) | remove (Keep the state of the first animation frame)
Default valueremove
AnimatableNo
+ +

animateMotion

+ +

For {{SVGElement('animateMotion')}}, fill defines the final state of the animation.

+ + + + + + + + + + + + + + + + +
Valuefreeze (Keep the state of the last animation frame) | remove (Keep the state of the first animation frame)
Default valueremove
AnimatableNo
+ +

animateTransform

+ +

For {{SVGElement('animateTransform')}}, fill defines the final state of the animation.

+ + + + + + + + + + + + + + + + +
Valuefreeze (Keep the state of the last animation frame) | remove (Keep the state of the first animation frame)
Default valueremove
AnimatableNo
+ +

circle

+ +

For {{SVGElement('circle')}}, fill is a presentation attribute that defines the color of the circle.

+ + + + + + + + + + + + + + + + +
Value<paint>
Default valueblack
AnimatableYes
+ +

Note: As a presentation attribute fill can be used as a CSS property.

+ +

ellipse

+ +

For {{SVGElement('ellipse')}}, fill is a presentation attribute that defines the color of the ellipse.

+ + + + + + + + + + + + + + + + +
Value<paint>
Default valueblack
AnimatableYes
+ +

Note: As a presentation attribute fill can be used as a CSS property.

+ +

path

+ +

For {{SVGElement('path')}}, fill is a presentation attribute that defines the color of the interior of the shape. (Interior is define by the {{SVGAttr('fill-rule')}} attribute)

+ + + + + + + + + + + + + + + + +
Value<paint>
Default valueblack
AnimatableYes
+ +

Note: As a presentation attribute fill can be used as a CSS property.

+ +

polygon

+ +

For {{SVGElement('polygon')}}, fill is a presentation attribute that defines the color of the interior of the shape. (Interior is define by the {{SVGAttr('fill-rule')}} attribute)

+ + + + + + + + + + + + + + + + +
Value<paint>
Default valueblack
AnimatableYes
+ +

Note: As a presentation attribute fill can be used as a CSS property.

+ +

polyline

+ +

For {{SVGElement('polyline')}}, fill is a presentation attribute that defines tthe color of the interior of the shape. (Interior is define by the {{SVGAttr('fill-rule')}} attribute)

+ + + + + + + + + + + + + + + + +
Value<paint>
Default valueblack
AnimatableYes
+ +

Note: As a presentation attribute fill can be used as a CSS property.

+ +

rect

+ +

For {{SVGElement('rect')}}, fill is a presentation attribute that defines the color of the rectangle.

+ + + + + + + + + + + + + + + + +
Value<paint>
Default valueblack
AnimatableYes
+ +

Note: As a presentation attribute fill can be used as a CSS property.

+ +

set

+ +

For {{SVGElement('set')}}, fill defines the final state of the animation.

+ + + + + + + + + + + + + + + + +
Valuefreeze (Keep the state of the last animation frame) | remove (Keep the state of the first animation frame)
Default valueremove
AnimatableNo
+ +

text

+ +

For {{SVGElement('text')}}, fill is a presentation attribute that defines what the color of the text.

+ + + + + + + + + + + + + + + + +
Value<paint>
Default valueblack
AnimatableYes
+ +

Note: As a presentation attribute fill can be used as a CSS property.

+ +

textPath

+ +

For {{SVGElement('textPath')}}, fill is a presentation attribute that defines the color of the text.

+ + + + + + + + + + + + + + + + +
Value<paint>
Default valueblack
AnimatableYes
+ +

Note: As a presentation attribute fill can be used as a CSS property.

+ +

tref

+ +

Warning: As of SVG2 {{SVGElement('tref')}} is deprecated and shouldn't be used.

+ +

For {{SVGElement('tref')}}, fill is a presentation attribute that defines the color of the text.

+ + + + + + + + + + + + + + + + +
Value<paint>
Default valueblack
AnimatableYes
+ +

Note: As a presentation attribute fill can be used as a CSS property.

+ +

tspan

+ +

For {{SVGElement('tspan')}}, fill is a presentation attribute that defines the color of the text.

+ + + + + + + + + + + + + + + + +
Value<paint>
Default valueblack
AnimatableYes
+ +

Note: As a presentation attribute fill can be used as a CSS property.

+ +

Specifications

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
SpecificationStatusComment
{{SpecName("SVG Animations 2", "#FillAttribute", "transform")}}{{Spec2("SVG Animations 2")}}Definition for animations
{{SpecName("SVG2", "painting.html#FillProperty", "fill")}}{{Spec2("SVG2")}}Definition for shapes and texts.
+ Adds context-fill and context-stroke.
{{SpecName("SVG1.1", "animate.html#FillAttribute", "fill")}}{{Spec2("SVG1.1")}}Initial definition for animations
{{SpecName("SVG1.1", "painting.html#FillProperty", "fill")}}{{Spec2("SVG1.1")}}Initial definition for shapes and texts
+ +

Browser compatibility

+ + + +

{{Compat("svg.attributes.presentation.fill")}}

+ +

Note: For information on using the context-fill (and context-stroke) values from HTML documents, see the documentation for the non-standard {{cssxref("-moz-context-properties")}} property.

-- cgit v1.2.3-54-g00ecf