我想画一条线连接两个 div,我使用了一个绝对位置的 svg,但是两个 div 之间的按钮无法点击。
我怎么能用z-index max,绝对位置画一条线,它可以点击这条线下的元素。 如果您有任何想法,它将对我有很大帮助,谢谢! this is my example
我的代码:
<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);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>```