简单的利用svg画线,只需修改对应的坐标点即可。
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title></title>
</head>
<body>
<?xml version="1.0" encoding="utf-8"?>
<svg class="svg1" version="1.1" id="svg_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
viewBox="0 0 1334 622" style="enable-background:new 0 0 1334 622; " xml:space="preserve">
<style type="text/css">
.st1{fill:#FFFFFF;stroke:#000000;stroke-dasharray: 20;}
.path {
stroke-dasharray: 1000;
stroke-dashoffset: 1000;
stroke:#34a4e4;
stroke-width:4px;
animation: dash 10s linear forwards;
}
.path1{
transition: all 5s ;
}
@keyframes dash {
from {
stroke-dashoffset: 1000;
}
to {
stroke-dashoffset: 0;
}
}
</style>
<line class="st0 path" x1="754.7" y1="186" x2="536" y2="474"/>
<line class="st1" x1="536" y1="474" x2="754.7" y2="186"/>
</svg>
</body>
</html>