I want to draw a line connect two div and I used a svg with position absolute but the button between two div is can't be click.
How could I draw a line with z-index max, position absolute and it can click on element under this line. If you have any idea it will help me a lot, thank you! this is my example
My code :
<html>
<body>
<div style="border: solid; width: 150px;height: 150px;"> div1 </div>
<svg height="210" width="500" style="position: absolute;">
<line x1="50" y1="0" x2="200" y2="200" style="stroke:rgb(255,0,0);stroke-width:2" />
</svg>
<div style="border: #3F3F3F;width: 150px;height: 150px;display: flex;align-items: center;justify-content: flex-end;">
<button>button </button>
</div>
<div style="border: solid;width: 150px;height: 150px;top: 360px;position: absolute;left: 169px;"> div3 </div>
</body>
</html>```