canvasやsvgで実現可能です
sample
javascript
1<script>
2window.addEventListener('DOMContentLoaded', function(e){
3 var list=[
4 ["130","160"],
5 ["80" ,"160"],
6 ["30" ,"160"],
7 ["160","130"],
8 ["160", "80"],
9 ["160", "30"],
10 ["190","160"],
11 ["240","160"],
12 ["290","160"],
13 ["160","190"],
14 ["160","240"],
15 ["160","290"],
16 ];
17 var count=0;
18 var timerId=setInterval(()=>{
19 var l=document.querySelector('#line');
20 l.setAttribute("x2",list[count][0]);
21 l.setAttribute("y2",list[count][1]);
22 count++;
23 if(count>=list.length) count=0;
24 console.log(count);
25 },500);
26});
27</script>
28
29<svg width="360" height="360" id="svg">
30<marker id="arrow" viewBox="-5 -5 10 10" orient="auto">
31<polygon points="-5,-5 5,0 -5,5" fill="skyblue" stroke="none" />
32</marker>
33<line id="line" x1="160" y1="160" x2="130" y2="160" stroke="skyblue" stroke-width="15" marker-end="url(#arrow)" />
34<circle cx="10" cy="160" r="3" fill="black" />
35<circle cx="60" cy="160" r="3" fill="black" />
36<circle cx="110" cy="160" r="3" fill="black" />
37<circle cx="160" cy="160" r="3" fill="black" />
38<circle cx="210" cy="160" r="3" fill="black" />
39<circle cx="260" cy="160" r="3" fill="black" />
40<circle cx="310" cy="160" r="3" fill="black" />
41<circle cx="160" cy="10" r="3" fill="black" />
42<circle cx="160" cy="60" r="3" fill="black" />
43<circle cx="160" cy="110" r="3" fill="black" />
44<circle cx="160" cy="210" r="3" fill="black" />
45<circle cx="160" cy="260" r="3" fill="black" />
46<circle cx="160" cy="310" r="3" fill="black" />
47</svg>
48
49
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。
2019/09/24 08:39
2019/09/24 08:42
2019/09/24 09:16 編集
2019/09/25 01:05