Occlusion problem of SVG Z-index layer

Svg elements do not support the Z-index attribute, so it is useless to set this. If you want to set the hierarchical relationship between SVG elements and Z axis, you can use the following method:

1. The elements created later will be superimposed on the previous elements. If you want to put an element at the top level, you can create it at last

2. Use D3 API sort insert to adjust the generation order of elements

Similar Posts: