begin
begin 屿§ã¯ãé¢é£ããè¦ç´ ããã¤ã¢ã¯ãã£ãã«ãªãããå®ç¾©ãã¾ãã
ã¢ãã¡ã¼ã·ã§ã³è¦ç´ ã§ã¯ãããã¯ã¢ãã¡ã¼ã·ã§ã³ãéå§ãããæç¹ã§ãã
ãã®å±æ§ã®å¤ã¯ãã»ãã³ãã³åºåãã®å¤ã®ãªã¹ãã§ããéå§æå»ã®ãªã¹ãã®è£éæ¹æ³ã¯ã SMIL 仿§æ¸ã® "Evaluation of begin and end time lists" ã«ããã¾ããããããã®åå¥å¤ã¯ã <offset-value>, <syncbase-value>, <event-value>, <repeat-value>, <accessKey-value>, <wallclock-sync-value> ã¾ãã¯ãã¼ã¯ã¼ã indefinite ã®ããããã§ãã
ãã®å±æ§ã¯ã以ä¸ã® SVG è¦ç´ ã§ä½¿ç¨ãããã¨ãã§ãã¾ãã
animate, animateMotion, animateTransform, set
<animate>, <animateMotion>, <animateTransform>, <set> ã§ã¯ã begin ã¯ãã¤è¦ç´ ãéå§ããããããªãã¡ã¢ã¯ãã£ãã«ãªããã§ãã
| å¤ | <begin-value-list> |
|---|---|
| æ¢å®ã®å¤ | 0s |
| ã¢ãã¡ã¼ã·ã§ã³ | ä¸å¯ |
<begin-value-list> ã¯ãã»ãã³ãã³ã§åºåãããå¤ã®ãªã¹ãã§ããããããã®å¤ã¯ä»¥ä¸ã®ããããã§ãã
<offset-value>-
ãã®å¤ã¯ãSVG ææ¸ã®éå§æç¹ ï¼é常ã¯
loadã¾ãã¯DOMContentLoadedã¤ãã³ãï¼ ã«å¯¾ããç¸å¯¾çãªæç¹ã表ã clock-value ãå®ç¾©ãã¾ããè² ã®å¤ãæå¹ã§ãã <syncbase-value>-
ãã®å¤ã¯ãåæãã¼ã¹ã¨ããã®åæãã¼ã¹ããã®ãªãã·ã§ã³ã®ãªãã»ãããå®ç¾©ãã¾ããè¦ç´ ã®ã¢ãã¡ã¼ã·ã§ã³ã®éå§æå»ã¯ãå¥ã®ã¢ãã¡ã¼ã·ã§ã³ã®éå§æå»ã¾ãã¯ã¢ã¯ãã£ããªçµäºæå»ãåºæºã¨ãã¦ç¸å¯¾çã«å®ç¾©ããã¾ãã
æå¹ãª syncbase-value ã¯ãå¥ã®ã¢ãã¡ã¼ã·ã§ã³è¦ç´ ã¸ã® ID åç §ã¨ããã®å¾ã«ãããã¨ãåç §ããã¢ãã¡ã¼ã·ã§ã³è¦ç´ ã®éå§ç¹ã¾ãã¯çµäºç¹ã¨ã®åæãèå¥ããããã®
beginã¾ãã¯endã§æ§æããã¾ãã<offset-value>ã§å®ç¾©ããããªãã·ã§ã³ã®ãªãã»ããå¤ãä»å ãããã¨ãã§ãã¾ãã <event-value>-
ãã®å¤ã¯ãã¤ãã³ãã¨ãè¦ç´ ã®ã¢ãã¡ã¼ã·ã§ã³ãå§ããæç¹ã決å®ãããªãã·ã§ã³ã®ãªãã»ãããå®ç¾©ãã¾ããã¢ãã¡ã¼ã·ã§ã³ã®éå§æå»ã¯ãæå®ããã¤ãã³ããçºçããæç¹ãåºæºã¨ãã¦ç¸å¯¾çã«å®ç¾©ããã¾ãã
æå¹ãªã¤ãã³ãå¤ã¯ãè¦ç´ ID ã«ãããã¨ããã®è¦ç´ ã§å¯¾å¿ãã¦ããã¤ãã³ãã®ãããããç¶ãããã®ã§ããæå¹ãªã¤ãã³ãï¼å¿ ããããã¹ã¦ã®è¦ç´ ã«å¯¾å¿ãã¦ããããã§ã¯ããã¾ããï¼ã¯ãã¹ã¦ã DOM ããã³ HTML 仿§ã§å®ç¾©ããã¦ãã¾ããæ¬¡ã®ã¨ããã§ãã
focusblurfocusinfocusoutDOMActivateauxclickclickdblclickmousedownmouseentermouseleavemousemovemouseoutmouseovermouseupwheelbeforeinputinputkeydownkeyupcompositionstartcompositionupdatecompositionendloadunloadaborterrorselectresizescrollbeginEventendEventrepeatEvent
<offset-value>ã§å®ç¾©ããããªãã·ã§ã³ã®ãªãã»ããå¤ãä»å ãããã¨ãã§ãã¾ãã <repeat-value>-
ãã®å¤ã¯ã修飾ãããç¹°ãè¿ãã¤ãã³ããå®ç¾©ãã¾ããè¦ç´ ã®ã¢ãã¡ã¼ã·ã§ã³ã®éå§æå»ã¯ãæå®ãããå復å¦çåæ°ã§ç¹°ãè¿ãã¤ãã³ããçºçããæç¹ãåºæºã¨ãã¦å®ç¾©ããã¾ãã
æå¹ãªç¹°ãè¿ãå¤ã¯ãè¦ç´ ID ã«ããããããã¦ç¹°ãè¿ãåæ°ãæå®ããæ´æ°å¤ã弿°ã¨ãã颿°
repeat()ã§æ§æããã¾ãã<offset-value>ã§å®ç¾©ããããªãã·ã§ã³ã®ãªãã»ããå¤ãä»å ãããã¨ãã§ãã¾ãã <accessKey-value>-
ãã®å¤ã¯ãã¢ãã¡ã¼ã·ã§ã³ãéå§ããã¢ã¯ã»ã¹ãã¼ãå®ç¾©ãã¾ããã¦ã¼ã¶ã¼ãæå®ãããã¼ãæ¼ãã¨ãè¦ç´ ã®ã¢ãã¡ã¼ã·ã§ã³ãå§ã¾ãã¾ãã
æå¹ãª accessKey å¤ã¯ã弿°ã¨ãã¦å ¥åããæåãå«ã颿°
accessKey()ã§æ§æããã¾ãã<offset-value>ã§å®ç¾©ããããªãã·ã§ã³ã®ãªãã»ããå¤ãä»å ãããã¨ãã§ãã¾ãã <wallclock-sync-value>-
ãã®å¤ã¯ãã¢ãã¡ã¼ã·ã§ã³ã®éå§æç¹ãå®éã®ä¸çã®æå»ã¨ãã¦å®ç¾©ãã¾ãã
æå¹ãª wallclock-sync-value ã¯ã弿°ã¨ãã¦æå»å¤ãæã¤é¢æ°
wallclock()ã§æ§æããã¾ããæå»ã®æ§æã¯ãISO 8601 ã§å®ç¾©ããã¦ããæ§æã«åºã¥ãã¦ãã¾ãã indefinite-
ã¢ãã¡ã¼ã·ã§ã³ã®éå§ã¯ã
beginElement()ã¡ã½ããã®å¼ã³åºããã¾ãã¯ãã®è¦ç´ ã対象ã¨ãããã¤ãã¼ãªã³ã¯ã«ãã£ã¦æ±ºå®ããã¾ãã
ä¾
>ãªãã»ããã®ä¾
<svg
width="120"
height="120"
viewBox="0 0 120 120"
xmlns="http://www.w3.org/2000/svg"
version="1.1">
<!-- animated rectangles -->
<rect x="10" y="35" height="15" width="0">
<animate
attributeType="XML"
attributeName="width"
to="100"
begin="0s"
dur="8s"
fill="freeze" />
</rect>
<rect x="35" y="60" height="15" width="0">
<animate
attributeType="XML"
attributeName="width"
to="75"
begin="2s"
dur="6s"
fill="freeze" />
</rect>
<rect x="60" y="85" height="15" width="0">
<animate
attributeType="XML"
attributeName="width"
to="50"
begin="4s"
dur="4s"
fill="freeze" />
</rect>
<!-- grid -->
<text x="10" y="20" text-anchor="middle">0s</text>
<line x1="10" y1="25" x2="10" y2="105" stroke="grey" stroke-width=".5" />
<text x="35" y="20" text-anchor="middle">2s</text>
<line x1="35" y1="25" x2="35" y2="105" stroke="grey" stroke-width=".5" />
<text x="60" y="20" text-anchor="middle">4s</text>
<line x1="60" y1="25" x2="60" y2="105" stroke="grey" stroke-width=".5" />
<text x="85" y="20" text-anchor="middle">6s</text>
<line x1="85" y1="25" x2="85" y2="105" stroke="grey" stroke-width=".5" />
<text x="110" y="20" text-anchor="middle">8s</text>
<line x1="110" y1="25" x2="110" y2="105" stroke="grey" stroke-width=".5" />
<line x1="10" y1="30" x2="110" y2="30" stroke="grey" stroke-width=".5" />
<line x1="10" y1="105" x2="110" y2="105" stroke="grey" stroke-width=".5" />
</svg>
åæãã¼ã¹ã®ä¾
<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">
<!-- animated rectangles -->
<rect x="10" y="35" height="15" width="0">
<animate
attributeType="XML"
attributeName="width"
to="50"
id="first"
begin="0s;third.end"
dur="4s" />
</rect>
<rect x="60" y="60" height="15" width="0">
<animate
attributeType="XML"
attributeName="width"
to="25"
id="second"
begin="first.end"
dur="2s" />
</rect>
<rect x="85" y="85" height="15" width="0">
<animate
attributeType="XML"
attributeName="width"
to="25"
id="third"
begin="second.end"
dur="2s" />
</rect>
<!-- grid -->
<text x="10" y="20" text-anchor="middle">0s</text>
<line x1="10" y1="25" x2="10" y2="105" stroke="grey" stroke-width=".5" />
<text x="35" y="20" text-anchor="middle">2s</text>
<line x1="35" y1="25" x2="35" y2="105" stroke="grey" stroke-width=".5" />
<text x="60" y="20" text-anchor="middle">4s</text>
<line x1="60" y1="25" x2="60" y2="105" stroke="grey" stroke-width=".5" />
<text x="85" y="20" text-anchor="middle">6s</text>
<line x1="85" y1="25" x2="85" y2="105" stroke="grey" stroke-width=".5" />
<text x="110" y="20" text-anchor="middle">8s</text>
<line x1="110" y1="25" x2="110" y2="105" stroke="grey" stroke-width=".5" />
<line x1="10" y1="30" x2="110" y2="30" stroke="grey" stroke-width=".5" />
<line x1="10" y1="105" x2="110" y2="105" stroke="grey" stroke-width=".5" />
</svg>
ã¤ãã³ãã®ä¾
<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">
<!-- animated rectangle -->
<rect x="10" y="35" height="15" width="0">
<animate
attributeType="XML"
attributeName="width"
from="0"
to="100"
begin="startButton.click"
dur="8s"
fill="freeze" />
</rect>
<!-- trigger -->
<rect
id="startButton"
cursor="pointer"
x="19.5"
y="62.5"
rx="5"
height="25"
width="80"
fill="#EFEFEF"
stroke="black"
stroke-width="1" />
<text x="60" y="80" text-anchor="middle" pointer-events="none">
ã¯ãªãã¯
</text>
<!-- grid -->
<text x="10" y="20" text-anchor="middle">0s</text>
<line x1="10" y1="25" x2="10" y2="55" stroke="grey" stroke-width=".5" />
<text x="35" y="20" text-anchor="middle">2s</text>
<line x1="35" y1="25" x2="35" y2="55" stroke="grey" stroke-width=".5" />
<text x="60" y="20" text-anchor="middle">4s</text>
<line x1="60" y1="25" x2="60" y2="55" stroke="grey" stroke-width=".5" />
<text x="85" y="20" text-anchor="middle">6s</text>
<line x1="85" y1="25" x2="85" y2="55" stroke="grey" stroke-width=".5" />
<text x="110" y="20" text-anchor="middle">8s</text>
<line x1="110" y1="25" x2="110" y2="55" stroke="grey" stroke-width=".5" />
<line x1="10" y1="30" x2="110" y2="30" stroke="grey" stroke-width=".5" />
<line x1="10" y1="55" x2="110" y2="55" stroke="grey" stroke-width=".5" />
</svg>
å復ã®ä¾
<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">
<!-- animated rectangle -->
<rect x="10" y="35" height="15" width="0">
<animate
attributeType="XML"
attributeName="width"
from="0"
to="100"
id="myLoop"
begin="0s;myLoop.end"
dur="4s"
repeatCount="3" />
<set
attributeType="CSS"
attributeName="fill"
to="green"
begin="myLoop.begin" />
<set
attributeType="CSS"
attributeName="fill"
to="gold"
begin="myLoop.repeat(1)" />
<set
attributeType="CSS"
attributeName="fill"
to="red"
begin="myLoop.repeat(2)" />
</rect>
<!-- grid -->
<text x="10" y="20" text-anchor="middle">0s</text>
<line x1="10" y1="25" x2="10" y2="55" stroke="grey" stroke-width=".5" />
<text x="35" y="20" text-anchor="middle">1s</text>
<line x1="35" y1="25" x2="35" y2="55" stroke="grey" stroke-width=".5" />
<text x="60" y="20" text-anchor="middle">2s</text>
<line x1="60" y1="25" x2="60" y2="55" stroke="grey" stroke-width=".5" />
<text x="85" y="20" text-anchor="middle">3s</text>
<line x1="85" y1="25" x2="85" y2="55" stroke="grey" stroke-width=".5" />
<text x="110" y="20" text-anchor="middle">4s</text>
<line x1="110" y1="25" x2="110" y2="55" stroke="grey" stroke-width=".5" />
<line x1="10" y1="30" x2="110" y2="30" stroke="grey" stroke-width=".5" />
<line x1="10" y1="55" x2="110" y2="55" stroke="grey" stroke-width=".5" />
</svg>
ã¢ã¯ã»ã¹ãã¼ã®ä¾
<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">
<!-- animated rectangles -->
<rect x="10" y="35" height="15" width="0">
<animate
attributeType="XML"
attributeName="width"
from="0"
to="100"
begin="accessKey(s)"
dur="8s"
fill="freeze" />
</rect>
<!-- trigger -->
<text x="60" y="80" text-anchor="middle" pointer-events="none">
"s" ãã¼ãæ¼ã
</text>
<!-- grid -->
<text x="10" y="20" text-anchor="middle">0s</text>
<line x1="10" y1="25" x2="10" y2="55" stroke="grey" stroke-width=".5" />
<text x="35" y="20" text-anchor="middle">2s</text>
<line x1="35" y1="25" x2="35" y2="55" stroke="grey" stroke-width=".5" />
<text x="60" y="20" text-anchor="middle">4s</text>
<line x1="60" y1="25" x2="60" y2="55" stroke="grey" stroke-width=".5" />
<text x="85" y="20" text-anchor="middle">6s</text>
<line x1="85" y1="25" x2="85" y2="55" stroke="grey" stroke-width=".5" />
<text x="110" y="20" text-anchor="middle">8s</text>
<line x1="110" y1="25" x2="110" y2="55" stroke="grey" stroke-width=".5" />
<line x1="10" y1="30" x2="110" y2="30" stroke="grey" stroke-width=".5" />
<line x1="10" y1="55" x2="110" y2="55" stroke="grey" stroke-width=".5" />
</svg>
ãã®ä¾ã¯ iFrame ã«åãè¾¼ã¾ãã¦ãã¾ãããã¼ã¤ãã³ããæå¹ã«ããã«ã¯ãæåã«ä¸ãã¯ãªãã¯ããå¿ è¦ãããã¾ãã
仿§æ¸
| 仿§æ¸ |
|---|
| SVG Animations Level 2 > # BeginAttribute > |