SVG re-ordering z-index (Raphael optional)

后端 未结 6 2045
鱼传尺愫
鱼传尺愫 2020-11-27 04:45

How can I reorder Raphael or their underlying SVG elements after creation. Better yet, do something like layers exist in SVG?

Ideally I would like two or more layers

6条回答
  •  日久生厌
    2020-11-27 04:58

    If you're using Raphael, popping elements backwards and forwards is very straightforward:

    element.toBack()
    element.toFront()
    

    Here's the relevant documentation.

提交回复
热议问题