stop
Baseline
Widely available
This feature is well established and works across many devices and browser versions. Itâs been available across browsers since â¨2015å¹´7æâ©.
ä¸ä¸ªæ¸åä¸çé¢è²å¡åº¦ï¼æ¯ç¨stopå
ç´ å®ä¹çãstopå
ç´ å¯ä»¥æ¯<linearGradient>å
ç´ æè
<radialGradient>å
ç´ çåå
ç´ ã
使ç¨ä¸ä¸æ
示ä¾
html
<svg
width="100%"
height="100%"
viewBox="0 0 80 40"
xmlns="http://www.w3.org/2000/svg">
<defs>
<linearGradient id="MyGradient">
<stop offset="5%" stop-color="#F60" />
<stop offset="95%" stop-color="#FF6" />
</linearGradient>
</defs>
<!-- Outline the drawing area in black -->
<rect fill="none" stroke="black" x="0.5" y="0.5" width="79" height="39" />
<!-- The rectangle is filled using a linear gradient -->
<rect
fill="url(#MyGradient)"
stroke="black"
stroke-width="1"
x="10"
y="10"
width="60"
height="20" />
</svg>
示ä¾è¾åºï¼
屿§
>å ¨å±å±æ§
- æ ¸å¿å±æ§ »
- å¤è§å±æ§ »
classstyle
䏿屿§
DOM æ¥å£
该å
ç´ å®ç°äº SVGStopElement æ¥å£ã