Curved lines using only HTML and/or CSS

前端 未结 2 937
清歌不尽
清歌不尽 2020-12-02 22:46

I need to add curved lines connecting nodes of a diagram in HTML. I want to create them using only HTML and/or CSS. I\'m ok with CSS3 even if not

2条回答
  •  醉话见心
    2020-12-02 23:24

    I think for hundreds, even up to thousands of objects, then SVG performance is not going to be too bad, certainly no worse than any other way you might approach it. The main performance issue would be in IE where you'd have to use some method to fall back to VML or Flash and you say you're not too concerned about IE8 support.

    You could draw all the lines in a single path and only have one object to deal with, as long as you're not going to be adding and removing lines all the time. All the lines in a path would have to be the same colour, so you'll need as many paths as you have colours of lines.

提交回复
热议问题