<div class="container"> <div class="tree"> <div class="branch" style="--x:0"> <span style="--i:0;"></span> <span style="--i:1;"></span> <span style="--i:2;"></span> <span style="--i:3;"></span> </div> <div class="branch" style="--x:1"> <span style="--i:0;"></span> <span style="--i:1;"></span> <span style="--i:2;"></span>
.container { width: 100%; display: flex; justify-content: center; align-items: center; } .tree { position: relative; width: 50px; height: 50px; transform-style: preserve-3d;