S
S
ssneg2011-09-20 21:10:18
css
ssneg, 2011-09-20 21:10:18

How to draw a slash line in HTML?

Hey!

I have a field (div) on which nodes are placed (many different divs). Between the nodes you need to "stretch the strings", i.e. draw oblique lines. Or not oblique, but Z-shaped. All this in jQuery.

Question: What is the best way to do this? Those. Recommend a good and lightweight library.

Thank you!

Answer the question

In order to leave comments, you need to log in

7 answer(s)
T
temaHT, 2011-09-20
@ssneg

Canvas is our everything.
www.html5dev.ru/canvas-api/2011/01/10/izuchaem-canvas-urok-2---risuem-linii-i-krivye.html

A
Ano, 2011-09-21
@Ano

<style>
hr {
  -webkit-transform: rotate(120deg);
     -moz-transform: rotate(120deg);
      -ms-transform: rotate(120deg);
       -o-transform: rotate(120deg);
}
</style>

<hr>


:)))

A
Ano, 2011-09-20
@Ano

The curves! Canvas is evil! SVG/VML! So, raphaeljs .

U
unspecified, 2011-09-20
@unspecified

I won’t tell you the library, but I think the best option is canvas

J
julie, 2011-12-21
@julie

how did you end up drawing it?

H
hf35, 2011-09-21
@hf35

The Pythagorean theorem and absolutely positioned nodes 1 by 1 pc will save the father of Russian democracy)
Well, or Raphael.
Both versions are cross-browser.
Canvas in the furnace. He is for someone else.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question