stroke-dasharray
Baseline
åºãå©ç¨å¯è½
ãã®æ©è½ã¯åºãå®è£ ããã¦ãããå¤ãã®ãã¼ã¸ã§ã³ã®ç«¯æ«ããã©ã¦ã¶ã¼ã§åä½ãã¾ãã2020å¹´3æä»¥éããã¹ã¦ã®ãã©ã¦ã¶ã¼ã§å©ç¨å¯è½ã§ãã
stroke-dasharray 屿§ã¯ãå³å½¢ã®æç·ãæãã®ã«ç¨ããããã·ã¥ã¨ããéã®ãã¿ã¼ã³ãå®ç¾©ãããã¬ã¼ã³ãã¼ã·ã§ã³å±æ§ã§ãã
ã¡ã¢:
ãã¬ã¼ã³ãã¼ã·ã§ã³å±æ§ã§ããããã stroke-dasharray ã«ã¯å¯¾å¿ãã CSS ãããã㣠stroke-dasharray ãããã¾ãã両æ¹ãæå®ãããå ´åã CSS ããããã£ãåªå
ããã¾ãã
ãã®å±æ§ã¯ä»¥ä¸ã® SVG è¦ç´ ã§ä½¿ç¨ãããã¨ãã§ãã¾ãã
ä¾
<svg viewBox="0 0 30 12" xmlns="http://www.w3.org/2000/svg">
<style>
line {
stroke: black;
}
</style>
<!-- ããã·ã¥ãããéããªã -->
<line x1="0" y1="1" x2="30" y2="1" />
<!-- ããã·ã¥ã¨ããéãåãé·ã -->
<line x1="0" y1="3" x2="30" y2="3" stroke-dasharray="4" />
<!-- ããã·ã¥ã¨ããéãç°ãªãé·ã -->
<line x1="0" y1="5" x2="30" y2="5" stroke-dasharray="4 1" />
<!-- ããã·ã¥ã¨ããéãæ§ã
ãªé·ãã§ãå¤ã®æ°ã奿° -->
<line x1="0" y1="7" x2="30" y2="7" stroke-dasharray="4 1 2" />
<!-- ããã·ã¥ã¨ããéãæ§ã
ãªé·ãã§ãå¤ã®æ°ãå¶æ° -->
<line x1="0" y1="9" x2="30" y2="9" stroke-dasharray="4 1 2 3" />
<!-- ããéããå§ã¾ãç ´ç· -->
<line x1="0" y1="11" x2="30" y2="11" stroke-dasharray="0 4 0" />
</svg>
使ç¨ä¸ã®ã¡ã¢
| å¤ | none | <dasharray> |
|---|---|
| æ¢å®å¤ | none |
| ã¢ãã¡ã¼ã·ã§ã³ | å¯ |
- <dasharray>
-
ã«ã³ãã¾ãã¯ç©ºç½ã§åºåããã
<length>ã¨<percentage>ã®ãªã¹ãã§ãããã·ã¥ã¨ã®ã£ããã®é·ããæå®ãã¾ãããã奿°ã®å¤ãæå®ãããå ´åã¯ãå¶æ°ã®å¤ã«ãªãããã«å¤ã®ãªã¹ããç¹°ãè¿ããã¾ããå¾ã£ã¦ã
5,3,2ã¯5,3,2,5,3,2ã¨ç価ã§ãã
仿§æ¸
| 仿§æ¸ |
|---|
| Scalable Vector Graphics (SVG) 2 > # StrokeDashing > |
ãã©ã¦ã¶ã¼ã®äºææ§
é¢é£æ å ±
- CSS ã®
stroke-dasharrayããããã£