y1
Baseline
åºãå©ç¨å¯è½
ãã®æ©è½ã¯åºãå®è£ ããã¦ãããå¤ãã®ãã¼ã¸ã§ã³ã®ç«¯æ«ããã©ã¦ã¶ã¼ã§åä½ãã¾ãã2015å¹´7æä»¥éããã¹ã¦ã®ãã©ã¦ã¶ã¼ã§å©ç¨å¯è½ã§ãã
y1 屿§ã¯ã2 ã¤ä»¥ä¸ã®åº§æ¨ãå¿
è¦ã¨ãã SVG è¦ç´ ãæç»ããããã® 1 ã¤ç®ã® Y 座æ¨ãæå®ããã®ã«ä½¿ãã¾ãã1 ã¤ãã座æ¨ãå¿
è¦ã¨ããªãè¦ç´ ã¯ãããã®ä»£ããã« y 屿§ã使ãã¾ãã
è¦ç´
ãã®å±æ§ã¯ãä¸è¨ã§èª¬æãã SVG è¦ç´ ã§ä½¿ç¨ãããã¨ãã§ãã¾ãã
<line>
<line> ã§ã¯ã y1 ã¯ç·ã®å§ç¹ã® Y 座æ¨ãå®ç¾©ãã¾ãã
| å¤ | <length> | <percentage> | <number> |
|---|---|
| ããã©ã«ãå¤ | 0 |
| ã¢ãã¡ã¼ã·ã§ã³ | å¯ |
<svg viewBox="0 0 10 10" xmlns="http://www.w3.org/2000/svg">
<line x1="1" x2="9" y1="1" y2="5" stroke="red" />
<line x1="1" x2="9" y1="5" y2="5" stroke="green" />
<line x1="1" x2="9" y1="9" y2="5" stroke="blue" />
</svg>
<linearGradient>
<linearGradient> ã«é¢ãã¦ã¯ãy1 ã¯ãã°ã©ãã¼ã·ã§ã³ã®è²çµç±ç¹ããããã³ã°ããã®ã«ä½¿ãããã°ã©ãã¼ã·ã§ã³ãã¯ãã« (gradient vector) ã®å§ç¹ã® y 座æ¨ãå®ãã¾ãããã®å±æ§ã®æ£ç¢ºãªæ¯ãèãã¯ãgradientUnits 屿§ã®å½±é¿ãåãã¾ãã
| å¤ | <length> |
|---|---|
| ããã©ã«ãå¤ | 0% |
| ã¢ãã¡ã¼ã·ã§ã³ | å¯ |
<svg viewBox="0 0 20 10" xmlns="http://www.w3.org/2000/svg">
<!--
æ¢å®ã§ã¯ãã°ã©ãã¼ã·ã§ã³ãã¯ãã«ã¯ãé©ç¨å
ã®å½¢ç¶ãå²ãå¢çã®
å·¦ä¸ã®è§ããå§ã¾ãã¾ãã
-->
<linearGradient y1="0%" id="g0">
<stop offset="5%" stop-color="black" />
<stop offset="50%" stop-color="red" />
<stop offset="95%" stop-color="black" />
</linearGradient>
<rect x="1" y="1" width="8" height="8" fill="url(#g0)" />
<!--
ããã§ã¯ãã°ã©ãã¼ã·ã§ã³ãã¯ãã«ã¯ãé©ç¨å
ã®å½¢ç¶ãå²ãå¢çã®
å·¦ä¸ã®è§ããå§ã¾ãã¾ãã
-->
<linearGradient y1="100%" id="g1">
<stop offset="5%" stop-color="black" />
<stop offset="50%" stop-color="red" />
<stop offset="95%" stop-color="black" />
</linearGradient>
<rect x="11" y="1" width="8" height="8" fill="url(#g1)" />
</svg>
ä¾
<svg viewBox="0 0 25 25" xmlns="http://www.w3.org/2000/svg">
<line x1="2" x2="22" y1="0" y2="20" stroke="red" />
<line x1="2" x2="22" y1="10" y2="20" stroke="green" />
<line x1="2" x2="22" y1="20" y2="20" stroke="blue" />
</svg>
仿§æ¸
| 仿§æ¸ |
|---|
| Scalable Vector Graphics (SVG) 2 > # LineElementY1Attribute > |
| Scalable Vector Graphics (SVG) 2 > # LinearGradientElementY1Attribute > |