问题描述
<!DOCTYPE html>
<html>
<head>
<Meta charset="utf-8">
<title></title>
</head>
<script src = "https://cdnjs.cloudflare.com/ajax/libs/svg.js/3.0.16/svg.min.js"></script>
<body>
<script>
var draw = SVG().addTo('body').size(900,900)
var linear = draw.gradient('linear',function(add) {
add.stop(0,'red')
add.stop(1,'#0000ff')
})
var p1 = draw.line(100,100,400,20).stroke(linear).stroke({width: 3})
var p2 = draw.line(200,200,200).stroke(linear).stroke({width: 3})
var p2 = draw.line(300,300,300).stroke(linear).stroke({width: 3})
</script>
</body>
</html>
// 如果 x1= x2 或 y1=y2 有效
// 问题在于线条渐变。当 x1=x2 或 y1=y2 没有任何作用。
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)