svg描边渐变的方法
<svg id="svgConnections" > <defs> <linearGradient id="grad1" > <stop offset="0%" style="stop-color:rgb(255,255,0);stop-opacity:1" /> <stop offset="100%" style="stop-color:rgb(255,0,0);stop-opacity:0" /> </linearGradient> </defs> <path d="M40,40 L100,100 Z" stroke="url(#grad1)" stroke-width="11" /> </svg>
https://codepen.io/a6965921/pen/dyNwZMw