Solution 1 :

Vector graphics are the best to be used whenever you need a graphical solution. But if you insist on using Javascript and such, try p5.js

Problem :

I’m working on a Personal web project I need to draw lines from 2 inputs to a third one.

How can I draw the lines (D in picture) using HTML, CSS and Js ?

enter image description here

EDIT: Ths inputs can be inside div blocks.

Comments

Comment posted by scunliffe

Although you could do this with typical HTML DOM elements, this is something that would be best done with either SVG (Scalable Vector Graphics) or the Canvas API (drawing pictures with pixels)

Comment posted by codepen.io/uolot/pen/gmuoC

codepen.io/uolot/pen/gmuoC

Comment posted by Heretic Monkey

Please do some research before asking questions (and show the results of that research in the question) .

By

Leave a Reply

Your email address will not be published. Required fields are marked *