Greetings! I am endeavoring to create an application featuring a straightforward HTML/CSS draggable tree layout.
<div class="tree">
<div class="leaf" draggable=true>
<div class="leaf-handle">item 1</div>
<div class="leaf subleaf" draggable=true>
<div class="leaf-handle">item 1.1</div>
<div class="leaf subsubleaf" draggable=true>
<div class="leaf-handle">item 1.1.1</div>
</div>
</div>
</div>
<div class="leaf" draggable=true>
<div class="leaf-handle">item 2</div>
<div class="leaf subleaf" draggable=true>
<div class="leaf-handle">item 2.1</div>
<div class="leaf subsubleaf" draggable=true>
<div class="leaf-handle">item 2.1.1</div>
</div>
</div>
</div>
</div>
If you want to view a code example illustrating the issue, you can visit this link: https://codepen.io/DerZinger/pen/bGQbEmd
The challenge I am encountering is that when attempting to drag a branch (an item with subitems), the "ghost" image (which represents the draggable elements) has a non-transparent background that persists despite various attempts to remove it.
Here's what it looks like:
https://i.sstatic.net/wx3N9.png
I urgently need to make it invisible (only showing the leaf-handles of the branch being dragged).
Any assistance or advice on HOW to achieve this would be greatly appreciated.
Edit 1: A suggestion was made to eliminate the background color. I tried doing that, but unfortunately, it did not work as expected. Removing it, making it opaque, and other attempted tricks still fail to completely "hide" the area I wish to conceal: https://i.sstatic.net/KUpM9.png