svg描边渐变的方法
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
如果遇到什么不懂的地方直接关注公众号留言(本文版权归作者和博客园共有,欢迎转载,但未经作者同意必须在文章页面给出原文连接,否则保留追究法律责任的权利。)
作者:newmiracle
出处:https://www.cnblogs.com/newmiracle/